You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by hacking bear <ha...@hotmail.com> on 2002/12/04 02:27:47 UTC

pre-compile, class package and Ant

Hello,

I attempt to use Ant1.5's jspc target to precompile my JSP page for Tomcat. 
I'm able to successfully compile the JSP into classes. but I found the 
resulting directory tree is different than that of Tomcat's automatic 
compilation. In the process of investigation, I found a few issues/question 
about Tomcat's way of generating classes from JSPs.

Say I have JSPs into two folders:
foo/
      p1.jsp
      error.jsp
bar/
      p2.jsp
     error.jsp

Tomcat automatically compile them to classes (with package org.apache.jsp ) 
in the same directory structure:
foo/
      p1.java   p1.class
     error.java   error.class
bar/
      p2.java    p2.class
     error.java   error.class

1. Does Tomcat assume all jsp classes be in package or.apache.jsp?

2. What happens to the two different error.class? They are different but 
they belong to the same package. Am I right? Would tomcat be able to load 
them separately?

3. JspC generates the java source files in the same structure as shown above 
but javac will generate class files in the normal java way like 
org/apache/jsp. Further the original folders of the JSP files are lost 
because all class files go to the same package; I couldn't even flatten-copy 
them to Tomcat's working directory. How could I get the same directory 
structure as Tomcat's using Ant? (I could do that in shell script by 
compiling-copying JSP file one by one.)

Thanks.
-HB


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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