You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Dayberry <Sc...@wcom.com> on 2002/09/09 21:27:12 UTC

jspc name-mangling and mapping vs. Tomcat on-the-fly compile

Sorry if this has been answered, but I couldn't find anything searching.  It
might be in older archives, as my issue is with Tomcat 3.2.3.

I'm trying to get JSP pre-compilation to work, but have the following
problem.  (The example is using a one page webapp,
$TOMCAT_HOME/webapps/jspcdemo/some.jsp).

How do I get the same mangled name for the .java and .class files from
jspc.sh as that produced by Tomcat when it compiles JSP's on-the-fly?

When Tomcat compiles, it generates for
 $TOMCAT_HOME/webapps/jspcdemo/some.jsp, the following files:
   _0002fsome_0002ejspsome.class
   _0002fsome_0002ejspsome_jsp_0.java
in the $TOMCAT_HOME/work/localhost_8080%2Fjspcdemo/ directory.

If I use jspc.sh, it produces 'some.java'.  If I use javac to compile this
to 'some.class', then copy these two files to the same /work directory,
Tomcat still does it's own compile when the page is hit.

If I put my pre-compiled .class file under
  $TOMCAT_HOME/webapps/jspcdemo/WEB-INF/classes
and use the web.xml file produced by jspc, then it works, but no log entries
are written to jasper.log file.  Why?  Also, this would require a seperate
servlet-mapping for each url.  Is this true?  For a large webapp with a
large number of jsp's, this means a long web.xml file.

Any comments are appreciated!





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jspc name-mangling and mapping vs. Tomcat on-the-fly compile

Posted by Ram Kochhar <r....@worldnet.att.net>.
----- Original Message -----
From: "Scott Dayberry" <Sc...@wcom.com>
To: "Tomcat-User (E-mail)" <to...@jakarta.apache.org>
Sent: Monday, September 09, 2002 12:27 PM
Subject: jspc name-mangling and mapping vs. Tomcat on-the-fly compile


> Sorry if this has been answered, but I couldn't find anything searching.
It
> might be in older archives, as my issue is with Tomcat 3.2.3.
>
> I'm trying to get JSP pre-compilation to work, but have the following
> problem.  (The example is using a one page webapp,
> $TOMCAT_HOME/webapps/jspcdemo/some.jsp).
>
> How do I get the same mangled name for the .java and .class files from
> jspc.sh as that produced by Tomcat when it compiles JSP's on-the-fly?
>
> When Tomcat compiles, it generates for
>  $TOMCAT_HOME/webapps/jspcdemo/some.jsp, the following files:
>    _0002fsome_0002ejspsome.class
>    _0002fsome_0002ejspsome_jsp_0.java
> in the $TOMCAT_HOME/work/localhost_8080%2Fjspcdemo/ directory.
>
> If I use jspc.sh, it produces 'some.java'.  If I use javac to compile this
> to 'some.class', then copy these two files to the same /work directory,
> Tomcat still does it's own compile when the page is hit.
>
> If I put my pre-compiled .class file under
>   $TOMCAT_HOME/webapps/jspcdemo/WEB-INF/classes
> and use the web.xml file produced by jspc, then it works, but no log
entries
> are written to jasper.log file.  Why?  Also, this would require a seperate
> servlet-mapping for each url.  Is this true?  For a large webapp with a
> large number of jsp's, this means a long web.xml file.
>
> Any comments are appreciated!
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: jspc name-mangling and mapping vs. Tomcat on-the-fly compile

Posted by Scott Dayberry <Sc...@wcom.com>.
Comments from anyone who's been successful in getting JSP precompile to work
is appreciated!

Since my first posting, I have since upgraded to Tomcat 4.0.4, hoping the
issue with precompile of JSP's would be fixed, but I am still not having
success getting it to work.

I'm running jspc.sh as:
jspc.sh -uriroot $CATALINA_HOME/webapps/jspcdemo -d
$CATALINA_HOME/work/Standalone/this.host.com/jspcdemo -web$CATALINA_HOME/web
apps/jspcdemo/jspcdemo.xml -webapp $CATALINA_HOME/webapps/jspcdemo

The files and class names produced from this are:
  some.java (containing "public class some")

These are not of the same form as those produced on-the-fly by Tomcat:
  some$jsp.java (containing "public class some$jsp")

Thus, Tomcat ignores these files, and does it's own compile anyway.
Any ideas?


> -----Original Message-----
> From: Scott Dayberry [mailto:Scott.Dayberry@wcom.com]
> Sent: Monday, September 09, 2002 1:27 PM
> To: Tomcat-User (E-mail)
> Subject: jspc name-mangling and mapping vs. Tomcat on-the-fly compile
>
>
> Sorry if this has been answered, but I couldn't find anything
> searching.  It
> might be in older archives, as my issue is with Tomcat 3.2.3.
>
> I'm trying to get JSP pre-compilation to work, but have the following
> problem.  (The example is using a one page webapp,
> $TOMCAT_HOME/webapps/jspcdemo/some.jsp).
>
> How do I get the same mangled name for the .java and .class files from
> jspc.sh as that produced by Tomcat when it compiles JSP's on-the-fly?
>
> When Tomcat compiles, it generates for
>  $TOMCAT_HOME/webapps/jspcdemo/some.jsp, the following files:
>    _0002fsome_0002ejspsome.class
>    _0002fsome_0002ejspsome_jsp_0.java
> in the $TOMCAT_HOME/work/localhost_8080%2Fjspcdemo/ directory.
>
> If I use jspc.sh, it produces 'some.java'.  If I use javac to
> compile this
> to 'some.class', then copy these two files to the same /work
> directory,
> Tomcat still does it's own compile when the page is hit.
>
> If I put my pre-compiled .class file under
>   $TOMCAT_HOME/webapps/jspcdemo/WEB-INF/classes
> and use the web.xml file produced by jspc, then it works, but
> no log entries
> are written to jasper.log file.  Why?  Also, this would
> require a seperate
> servlet-mapping for each url.  Is this true?  For a large
> webapp with a
> large number of jsp's, this means a long web.xml file.
>
> Any comments are appreciated!
>
>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>