aspose file tools*
The moose likes JSP and the fly likes reduce the time for converting JSP into servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "reduce the time for converting JSP into servlet" Watch "reduce the time for converting JSP into servlet" New topic
Author

reduce the time for converting JSP into servlet

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
If we request a JSP file for the first time the JSP
file first converted into the servlet for that some
amount of time will be wasted. Shall we reduce this
wastage of time
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
Use the <load-on-startup> element in web.xml.


Leandro Melo
SCJP 1.4, SCWCD 1.4
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
You can precompile your jsp pages before deploying them. This will eliminate the need to compile on the fly for the first request. The <load-on-startup> element in the web.xml shouldn't be used to precompile jsp pages. It is intended for servlets that you need to have loaded and instantiated when the app server starts.


“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
Yes, Paul is right. Sorry for the mistake.
Anyway, usually the application servers provide some mechanism to initialize jsps at startup. This is not required by the spec, but most of them allow you to do so.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reduce the time for converting JSP into servlet
 
Similar Threads
load-on-startup tag
jsp page translation time
JSP lifecycle
Tracking the JSP translation time
JSP Compile