tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Rubdi" <>
Subject Re: Excluding JSP compiler from Tomcat
Date Sat, 26 May 2007 00:32:21 GMT
On 5/25/07, lightbulb432 <> 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


    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

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

Many recommend the 2nd option as it makes your pre-compiled code
portable aross containers.

> Thanks.


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message