----- Original Message ----- From: "Jens Viebig" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 07, 2002 8:46 AM Subject: jspc Task usage ?
> 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 that may actually work on ant1.6alpha, the CVS version, but it doesnt on 1.5 > > - 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. Known bug. Known in jasperc and ant. Now if your version of jasperc doesnt have this problem (what version are you using BTW?), then there have been some improvements that jspc needs to pick up on. > - 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. yes, and that shows it is a bug in jasperc, not ant. I would recommend using tomcat4.1's version of jasperc, but even that is not going to work perfectly. Sorry. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
