You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joan Xiao <jo...@arcot.com> on 2000/12/13 02:50:09 UTC
How to precompile jsp
Hi all,
I've been trying to use jspc to precompile the jsp pages into java classes.
Below is the steps
I've taken:
1. run jspc and generate the java code and web.xml
2. insert the web.xml generated in step1 into my web.xml.
3. compile the java files into class files.
Now I have problem with where to put the class files. Should they be
under the web-inf\classes
or the work\ directory? I put them under web-inf\classes. And I have the
classes preserve
the package/directory structure.
4. restart Tomcat.
Result: the jsp pages under the first level directory are not re-compiled by
Tomcat, but those
under the 2nd level directory are re-compiled. For example, suppose I have
the following directory structure:
webapps
+ registration
+ enroll
+ web-inf
+ classes
The jsps under registration/ are not recompiled, but those under
registration/enroll are re-compiled by Tomcat, as I can see the java/class
files in the work/ directory.
How can I make it work? Do I have to put the classes files under work/ and
name them the same
way Tomcat names them?
Thanks for any help.
Joan