Thomas Br�ckner wrote:
>>Most containers provide a tool for precompiling JSP pages and 
>>creating the necessary web.xml mappings from the JSP page 
>>URLs to the corresponding precomiled servlet class. For 
>>Tomcat 4, it's called JspC.
> 
> 
> Ok, but is it possible to tell Tomcat 4 to use *only* these compiled
> JSPs (i.e. servlet classes) without looking for any JSP any more? We
> would like to deliver only the .class files - without the JSPs.

Yes. Along with the source Java code for the pages, JspC generates
mappings like this:

   <servlet>
     <servlet-name>dir.pageName</servlet-name>
     <servlet-class>dir.pageName</servlet-class>
   </servlet>

   <servlet-mapping>
     <servlet-name>dir.pageName</servlet-name>
     <url-pattern>/dir/pageName.jsp</url-pattern>
   </servlet-mapping>

With these mappings, the servlet class is invoked directly, without
going through Jasper (the JSP container), and without looking for
a JSP file. You deploy only the compiled classes (ideally packaged
in a JAR file). If you deploy to a different container than Tomcat,
you also need to include the runtime classes the precompiled pages
depend on: TOMACTA_HOME/lib/jasper-runtime.jar.

Since this is off-topic for this list, I suggest that you read the
JspC docs, play with it, and if you have more questions, post them
to the Tomcat User list instead.

Hans
-- 
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
JavaServer Pages        http://TheJSPBook.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to