Recent Posts

RSS Feeds

Catalina AKA Tomcat Ant tasks

I'm a big fan of the catalina/tomcat ant tasks so i was excited to see Matt's post. So even though I have alot of stuff I should be doing I just could not resist taking the new stuff for a spin.

Well its not quite as straight forward as the nifty Cactus Integration is. (Matt sited the cactus integration in his bug report.)

In short the catlina.tasks file is burried deep in the zip file at org/apache/catalina/ant/catalina.tasks. Which by its self is not that big of a deal, but it references the Jasper JSP Compiler so you must have more than the catalina-ant.jar file in your classpath.

Here is the classpath that worked for me, however I did not use the jasper2 (JspC) task so there could be some additional classes required for that task to work.

<path id="tomcat.classpath">
  <pathelement location="${tomcat.home}/server/lib/catalina-ant.jar"/>
  <pathelement location="${tomcat.home}/common/lib/jasper-compiler.jar"/>
  <pathelement location="${tomcat.home}/common/lib/jasper-runtime.jar"/>
  <pathelement location="${tomcat.home}/common/lib/servlet-api.jar"/>
  <pathelement location="${tomcat.home}/common/lib/commons-logging.jar"/>
</path>

and here is the taskdef element

<taskdef resource="org/apache/catalina/ant/catalina.tasks"
          classpathref="tomcat.classpath"/>

Permalink     No Comments



Post a Comment:
  • HTML Syntax: Allowed