Is anyone using the jspc task to precompile jsp ?
I'm Using Tomcat 4.0.4
What i like to do is:
- precompile my jsp ( generate .java files)
- compile to class files
- update my web.xml
- Deploy my application without .jsp files
I tried to do it like this:
<jspc
srcdir="src/web"
destdir="build/jsp-gensrc"
verbose="9"
webinc="src/merge/web/webinc.xml"
uriroot="src/web">
<include name="**/*.jsp" />
</jspc>
Problems occuring:
- How to specify the 'webapp' - Flag ? there is a addWebApp()-Method in the
jspc-Task but i don't know how to use it from my build.xml-File
- All java-Files get the same package name (...in the same directory
killing each other) . But i have index.jsp and subdir/index.jsp so package
for the second jsp should include subdir.
- webinc.xml servlet-mappings are incorrect:
<servlet-mapping>
<url-pattern>\index.jsp</url-pattern>
<servlet-name>index</servlet-name>
</servlet-mapping>
should be
<servlet-mapping>
<servlet-name>index</servlet-name>
<url-pattern>\index.jsp</url-pattern>
</servlet-mapping>
(Validation in JBoss/Tomcat Bundle fails telling me that url-pattern is not
allowed at this place)
if i do it via the command line:
jspc.bat -v1 -d build/jspgensrc -webinc src/merge/web/webinc.xml -webapp
src/web the first issue does not occur. The second issue is still there.
Greets
Jens Viebig
--
To unsubscribe, e-mail: <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
|