-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David,
On 7/22/2009 5:41 PM, David Wall wrote: > In a production environment in which JSPs do not change frequently, I'd > like to reduce the overhead of checking for JSP recompiles, assuming > that such checks are in fact costly You might want to look at the Tomcat code to see just how costly these check are. I suspect they are less costly than you think. > and instruct Tomcat to recompile a given JSP should it change. In our > environment, the JSP is written out by our web app. > > I noted the page.jsp?jsp_precompile=true type of option, but this seems > to have no effect if Tomcat's web.xml sets the JspServlet param > development=false. This is probably a security feature. If anyone could force your app server to recompile your JSPs at will, they could launch a DOS attack by constantly recompiling all your JSPs. Not only would it eat up CPU time by performing the actual compilation, but during the recompile, the JSP is probably locked by the compiling thread so that other requests for that same JSP are delayed until the recompile is complete. That means that other users will be affected by the recompile request, and everything sucks for everyone. You may need to hack the Tomcat code in order to allow this behavior. If you choose to do this, consider making it a nice patch and submitting it as an enhancement. I can see separate configuration parameters for Tomcat: development=true|false sets the two below flags to true|false jspUpToDateCheck=true|false enables checking JSPs for up-to-date status allowJspPrecompileParam=true|false enables the precompilation This would allow you to configure Tomcat to allow recompiles, but not to do up-to-date checks. This makes sense when, for example, your JSPs are in the WEB-INF directory and cannot be accessed directly. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkpxyrYACgkQ9CaO5/Lv0PBzrwCePb5h023njIzTYkNzW+hNcsow 9lAAnjV+wbb6lQypJLATlTE8DVTkaWJX =sOU/ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org