tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oskar Zinger <>
Subject Re: Precompiled JSPs
Date Thu, 12 Jul 2001 17:26:34 GMT
Hi Uri,
You have to compile your JSPs with -webxml and -webapp options.  This
option will create a web.xml file with all the required servlet mapping
and everything will work fine.

I ran such command: -p <package name> -dd <directory there to output translate java
files> -webxml <path where to store a web.xml file (i.e. /temp/web.xml)>
-webapp <directory of your webapp where all the JSPs reside>

After the web.xml file is produced you have incorporate it with your
tomcat original web.xml file.

Or you could create a servlet mapping for your jsps manually.  In the
following way:
.  you need to put all servlet tags first (for each jsp)
.  then servlet-mapping tags go (for each jsp)

This way you do not need to change urls in your original JSPs to class
names, you can just use the same urls in your JSPs and pre-compiled JSPs.

Hope this helps,

Uri Cohen wrote:

> I precompiled all my JSPs in the application, using jspc. Most pages
> work OK, but there are some pages which don't. For some reason, when
> loading these pages the session is lost, causing many errors. I solved
> the problem by sending the request parameter JSESSIONID when calling
> these pages.
> These pages worked fine as regular JSPs, and this symptom only occures
> when I use them as servlets.
> Has anyone encountered such a problem?

View raw message