Is jspcache the place that Tomcat is looking for generated classes? If so, 
then the custom JSP classloader is doing its magic.

The java and class files produced by the JspC command line compiler should be 
able to be jared up and placed into the WEB-INF directory, like any other 
servlet.  And the web.xml then maps the jsp URIs to servlets.

Jasper 1 could do this, I provided some of the patches to make it work.

The real test is to take all of the output from JspC and create a WAR file 
from it. Without the base jsp files. This WAR should operate in ANY servlet 
container. 


On Wednesday 21 August 2002 02:22 pm, John Trollinger wrote:
> Greg,
>
> I took this off of the bug tracking because it is not a bug and I
> thought there are people a lot smarter than me in this mailing list that
> could help answer you questions.
>
> I do not know how jasper differentiates between hello.jsp and
> /anydir/hello.jsp when the both compile to a class
> org.jasper.jsp.hello_jsp but it does work...
>
> My hello.jsp in the root dir prints hello Jasper world and my hello.jsp
> in the subdir prints hello john world.  It works without a hitch..
> (notice that I have removed the .java files for the 2 hello world files
> and it did not regenerate them)
>
> Here is my file list
>
> Directory of C:\appserver\Tomcat\jspcache
>
> 08/21/2002  02:19 PM    <DIR>          .
> 08/21/2002  02:19 PM    <DIR>          ..
> 08/21/2002  11:47 AM             3,496 date_jsp.java
> 08/21/2002  11:52 AM             2,975 hello_jsp.class
> 08/21/2002  11:51 AM             2,883 index_jsp.class
> 08/21/2002  11:51 AM             1,863 index_jsp.java
> 08/21/2002  01:27 PM    <DIR>          subdir
>                4 File(s)         11,217 bytes
>
>  Directory of C:\appserver\Tomcat\jspcache\subdir
>
> 08/21/2002  01:27 PM    <DIR>          .
> 08/21/2002  01:27 PM    <DIR>          ..
> 08/21/2002  11:47 AM             3,334 date2_jsp.java
> 08/21/2002  11:52 AM             2,970 hello_jsp.class
>
> Here is my jsp.xml
>
> <!--
> Automatically created by Tomcat JspC.
> Place this fragement in the web.xml before all icon, display-name,
> description, distributable, and context-param elements.
> -->
>
>       <servlet>
>               <servlet-name>org.apache.jsp.date_jsp</servlet-name>
>               <servlet-class>org.apache.jsp.date_jsp</servlet-class>
>       </servlet>
>
>       <servlet>
>               <servlet-name>org.apache.jsp.hello_jsp</servlet-name>
>               <servlet-class>org.apache.jsp.hello_jsp</servlet-class>
>       </servlet>
>
>       <servlet>
>               <servlet-name>org.apache.jsp.date2_jsp</servlet-name>
>               <servlet-class>org.apache.jsp.date2_jsp</servlet-class>
>       </servlet>
>
>       <servlet>
>               <servlet-name>org.apache.jsp.hello_jsp</servlet-name>
>               <servlet-class>org.apache.jsp.hello_jsp</servlet-class>
>       </servlet>
>
>       <servlet-mapping>
>               <servlet-name>org.apache.jsp.date_jsp</servlet-name>
>               <url-pattern>/date.jsp</url-pattern>
>       </servlet-mapping>
>
>       <servlet-mapping>
>               <servlet-name>org.apache.jsp.hello_jsp</servlet-name>
>               <url-pattern>/hello.jsp</url-pattern>
>       </servlet-mapping>
>
>       <servlet-mapping>
>               <servlet-name>org.apache.jsp.date2_jsp</servlet-name>
>               <url-pattern>/subdir/date2.jsp</url-pattern>
>       </servlet-mapping>
>
>       <servlet-mapping>
>               <servlet-name>org.apache.jsp.hello_jsp</servlet-name>
>               <url-pattern>/subdir/hello.jsp</url-pattern>
>       </servlet-mapping>
>
> <!--
> All session-config, mime-mapping, welcome-file-list, error-page, taglib,
> resource-ref, security-constraint, login-config, security-role,
> env-entry, and ejb-ref elements should follow this fragment.
> -->


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

Reply via email to