user3413804
user3413804

Reputation: 31

How to disable JSP Compilation during runtime in tomcat

I need to disable jsp compilation during runtime. I already have pre-compiled all the jsp files into the product. In production environment I do not want any new jsp to run.

Upvotes: 1

Views: 2116

Answers (2)

Parthi P
Parthi P

Reputation: 65

You can use jasper2 production configuration to disable the JSP compilation at runtime.

Refer : https://tomcat.apache.org/tomcat-8.0-doc/jasper-howto.html#Production_Configuration

Setting development=false will solve your problem.

Upvotes: 0

Har Krishan
Har Krishan

Reputation: 273

By default a JSP will only be complied once until you changes it. You have nothing to do for achieving that. For your confirmation you can call a JSP first time and you will observe that it took much time than when you will call the same (unmodified) JSP second time.

Upvotes: 0

Related Questions