Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Copiling jspcs with ant for use in tomcat

paultaylorApr 16 2003 — edited Apr 17 2003
Hi,
I would like to use ant (1.5.3) to parse jsps and then compile the
servlet for use in tomcat (4.0.6).Ive got in compiling (see end ) but
have two problems.
1. Is there any way to get them to compile to the correct name e.g
jspname$jsp.class rather than jspname.class.

2. If I try to to the jspc in one go it fails with IOException
(because of the number of files) so I've had to compile 1 letter at a
time, Im sure there must be a better solution ?

Extract of ant file:

<target name="jspparse" >
<jspc srcdir="${webserver}" destdir="${deploy}" verbose="1">
<include name="**/a*.jsp" />
<classpath><pathelement path="${classpath}" />
</classpath>
</jspc>

<jspc srcdir="${webserver}" destdir="${deploy}" verbose="1">
<include name="**/b*.jsp" />
<classpath><pathelement path="${classpath}" /></classpath>
</jspc></target>

<target name="jspcompile" depends="jspparse" >
<javac srcdir="${deploy}" destdir="${deploy}" deprecation="false"
verbose="true" >
<classpath><pathelement path="${classpath}" /></classpath>
</javac>
</target>

cheers Paul
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2003
Added on Apr 16 2003
4 comments
155 views