I did as Mark suggested and set the "classpath" property of the japer task to a jar containing the classes and it worked.

Thank you!


On 02/26/2018 06:29 PM, M. Manna wrote:
You can create an Ant directory variable which gets added to your job and
can be looked up for additional dependency. Check path,fileset from Ant
docs to see how you can add it to ant task




On 26 Feb 2018 9:52 pm, "Mark Thomas" <ma...@apache.org> wrote:

On 26/02/18 20:22, Juan Florez wrote:
Hello,

I'm trying to precompile the JSPs in a project, and so far I almost got
it working, but I'm getting this error:

BUILD FAILED
.../iTrust/build.xml:10: org.apache.jasper.JasperException:
file:.../iTrust/WebRoot/auth/hcp/editRepresentatives.jsp (line: 123,
column: 0) Unable to load tag handler class
"edu.ncsu.csc.itrust.tags.PatientNavigation" for tag "itrust:patientNav"

I'm guessing it is because this project is structured in a weird way.
This is my ant target:

    <target name="jspc">
     <jasper
              validateXml="false"
              uriroot="${webapp.path}/WebRoot"
webXmlFragment="${webapp.path}/WebRoot/WEB-INF/generated_web.xml"
              outputDir="${webapp.path}/WEB-INF/src" >
     </jasper>

   </target>

I have the compiled classes at "${webapp.path}/build", so if there is a
way to set the classpath or put the classes in a place where jasper will
find them, I think it would work. I don't need to run the project, I
just need the JSPs precompiled to run some static analysis on the code.

Thank you.
It looks like you need the JAR with the external tag library on Jasper's
class path. The jasper task has a class path attribute and I think
you'll need to set this to point to the JAR file(s). It should be
structured the same way you'd specify a class path on the command line.
I don't think is supports Ant's <classpath>.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


--
Juan Manuel Florez
Software Engineering PhD Student


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to