Re: JSP Performance

2001-09-05 Thread Jim Cheesman

At 09:48 PM 04/09/01, you wrote:
Hi,
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 
CATALINA/TOMCAT_HOME.

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

 From a post by Sophie ?:
sponiza
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,
Sophie
/sponiza

Jim




--

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





Re: JSP Performance

2001-09-05 Thread Luc Vanlerberghe

Jim Cheesman wrote:

 At 09:48 PM 04/09/01, you wrote:

 Hi,
 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 CATALINA/TOMCAT_HOME.

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

 From a post by Sophie ?:
 sponiza
 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,
 Sophie
 /sponiza

 Jim




 -- 

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

Another way is to call your pages in a browser adding the jsp_precompile 
parameter (See section 8.4.2 of the JSP 1.2 PFD Spec)
E.g.: http://myserver/mywebapp/mypage.jsp?jsp_precompile=true;

This gives a hint to the servlet/jsp container that the page should be 
precompiled and installed as a servlet.
The page itself will *not* be executed.

I don't know if there's a way to specify that all jsp pages in a webapp 
should be precompiled

Luc Vanlerberghe






JSP Performance

2001-09-04 Thread Don Ha

Hi,
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?
Thanks.
Don Ha

__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com