Glen, thanks for responding. I placed both the property and path element references to servlet-api at the beginning of their respective sections, and defined jdk.javac.path. I still get the same error.
Any ideas on why build.xml provided by the Tomcat website doesn't work? --- Glen Mazza <[EMAIL PROTECTED]> wrote: > Olinga K. Abbott wrote: > > > BUILD FAILED > > E:\workspace\progsoftware\trunk\source\jasper\build.xml:5: taskdef A class > > needed by class > > org.apache.jasper.JspC cannot be found: javax/servlet/ServletException > > > > Of course, it looks like it can't find javax.servlet.ServletException > while building. This is kept in servlet-api.jar. > > > > > ant -Dtomcat.home="C:\Program Files\Apache Software Foundation\Tomcat 5.5" > > -Dwebapp.path=E:\workspace\progsoftware\trunk\source\jasper > > > > webapp.path is the working directory, target directory, and source > > directory, since I want to > keep > > things as simple as possible while getting everything working correctly. > > > > > > --------- BEGIN ------------ > > > > <project name="Webapp Precompilation" default="jspc" basedir="."> > > > > <property name="ant.lib" location="C:/apache-ant-1.6.5/lib"/> > > <property name="tomcat.home" location="C:/Program Files/Apache Software > > Foundation/Tomcat > 5.5"/> > > <property name="jdk.tools" location="C:/Program > > Files/Java/jdk1.5.0_06/lib/tools.jar"/> > > <property name="jasper.compiler" location="${ant.lib}/jasper-compiler.jar"/> > > <property name="jasper.runtime" location="${ant.lib}/jasper-runtime.jar"/> > > <property name="servlet.api" > > location="${tomcat.home}/common/lib/servlet-api.jar"/> > > > > <echo message="${jasper.compiler}"/> > > <echo message="${servlet.api}"/> > > <echo message="${jdk.tools}"/> > > > > <path id="classpath"> > > <pathelement location="${jdk.javac.path}"/> > > <pathelement location="${jasper.compiler}"/> > > <pathelement location="${jasper.runtime}"/> > > <pathelement location="${servlet.api}"/> > > </path> > > > > jdk.javac.path doesn't seem to be defined anywhere--that may be a > problem. Also, I'm unsure if it matters, but ${servlet.api} is listed > last in this set, so the Jasper libraries listed earlier may not be able > to find it, and hence may not be able to see the ServletException class. > I would move servlet.api before the jasper references. > > > > <taskdef classname="org.apache.jasper.JspC" name="jasper2"> > > <classpath refid="classpath" /> > > </taskdef> > > > > <target name="jspc"> > > <classpath refid="classpath" /> > > <jasper2 > > validateXml="false" > > uriroot="." > > webXmlFragment="./generated_web.xml" > > outputDir="." /> > > </target> > > > > </project> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]