On 5/25/07, lightbulb432 <[EMAIL PROTECTED]> wrote:
The JSP spec says that if you precompile JSPs you can reduce the JSP container footprint by excluding the JSP compiler. How can this be done in Tomcat?
I know of 2 ways to pre-compile JSPs 1) http://tomcat.apache.org/tomcat-4.1-doc/jasper-howto.html If you're using Ant , than you can add the above jasper task to your build process. The process first converts all JSPs to .java files, and then all .java files are compiled to .class files , during this process the web.xml is also auto-modified and there's an entry for every JSP page in your app. Pre-compiling with jasper is very slow (expected behavior) , so it is recommended that the pre-compile should be done just before deploying the app to production , there's no need to pre-compile while developing/ testing JSPs. 2) Use JSP Unit testing tools like HttpUnit or Apache Cactus, as the tools test each JSP page they acces the JSP pages for the ~first time~ , this essentially compiles all JSP pages , then move the war file to production. Many recommend the 2nd option as it makes your pre-compiled code portable aross containers.
Thanks.
Regards Rashmi --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]