tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Cheesman <>
Subject Re: JSP Performance
Date Wed, 05 Sep 2001 06:59:41 GMT
At 09:48 PM 04/09/01, you wrote:
>I have a JSP file and it takes nearly 25 seconds to
>run for the first time.  Is there a way to make JSP's
>fast on first execution?

The first call will always (*) take longer, as tomcat has to translate and 
compile your page - you can see the final result in the work directory in 

* The exception: if you precompile (using jspc.bat) the pages to servlets, 
and then "install" them in web.xml.

 From a post by Sophie ?:
Hi Oskar,
I am using the options:
-uriroot /$TOMCAT_HOME/webapps/AppName
-d /$TOMCAT_HOME/webapps/AppName/WEB-INF/classes
to set the directory where the results of jspc should be placed
-webxml /OWN_DIR/webAppName.xml
-webapp /$TOMCAT_HOME/webapps/AppName
to specify the directory that contains the jsp's
I remove the jsp's after running jspc from /$TOMCAT_HOME/webapps/AppName.
After running jspc, you should run javac to compile the generated 
java-files to
class files.
I update my own web.xml with the results of /$OWN_DIR/webAppName.xml,
and then everything runs fine.
Hope this help,



                           *   Jim Cheesman   *
             Trabajo: - (34)(91) 724 9200 x 2360
                  What is the 
probability that something
                    will happen according to the 

View raw message