Precompiling JSPs
843835Mar 12 2003 — edited Feb 12 2004Hi,
I am trying to precompile a complete webapp containing about a hundred pages to be run isinde Tomcat 4.1. I was able to translate the pages with JSPC like this:
jspc.bat -d c:/temp/jspcout -webapp c:/dev/webapps/myapp"
Then I try to compile the resulting java files using javac. The problem is that all java source files produced by jspc have the same package name: org.apache.jsp . Javac then puts all resulting class files in a directory structure respecting the package name: org/apache/jsp .
Compilation ends when Javac complains that there are duplicate classes, that is, JSP pages with the same name (ex: index.jsp), but in different directories will produce duplicate classes (index_jsp.class) in the same ouput directory.
Normally with Tomcat, java and class files go together in a directory under tomcat/work that reflects the original directory structure of the JSP pages, not the package structure.
How can I use javac to compile java files that are NOT under a directory structure that reflects their package and have the output classes created in the same directory as the corresponding java file?
Thank you,
Jean-Robert Haddad