Before upgrading to tomcat 4.1.27, thsi worked fine. Now I get this exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 14 at org.apache.jasper.JspC.locateUriRoot(JspC.java:628) at org.apache.jasper.JspC.execute(JspC.java:759) at org.apache.jasper.JspC.main(JspC.java:823) Is there any issues with tomcat 4 and jspc?
There are no issues I am aware of. Without any steps to reproduce the issue, my best guess from looking at the code is the command you are using is somehow malformed. I would suggest that the tomcat-user mailing list is the best place to seek further help.
The exception occurs when calling the jspc ant target with a srcdir without a WEB-INF root considering the following directory structure: c: - src - myapp - web - src - build with a simple .jsp file in the web dir. The following ant target wil generate the exception <target name="jsp-compile-test"> <property name="app-dir" value="c:\src\myapp"/> <property name="genjsp" value="${app-dir}/build/gensrc" /> <property name="web" value="${app-dir}/web"/> <delete dir="${genjsp}" failonerror="false"/> <mkdir dir="${genjsp}"/> <jspc destdir="${genjsp}" verbose="1" srcdir="${web}" compiler="jasper41" classpathref="jasper.classpath"> <include name="**/*.jsp"/> </jspc> </target> However, if the dir WEB-INF exists it works fine. Granted, it makes sense that the WEB-INF dir must exist, but a more userfriendly error message would be nice. OS : WinXP Pro sp2 JDK : Sun 1.4.2_08 TOMCAT : 4.1.31
This has been fixed in CVS and will be included in 4.1.32+