[Actionframework-users] bug in ActionServlet ActionRuntime.java
Status: Inactive
Brought to you by:
ptoman
From: Mark D. A. <md...@di...> - 2002-08-06 03:38:43
|
in ActionRuntime.java there is this line: actionConfigFile = new File(servlet.getClass().getResource("/" + configFilename).getFile()); which will give NullPointerException if getResource fails (remember getResource just returns null on failure; it does not throw an exception). btw, in order to get the velocity conversion to work, this will work in build.xml as an alternative to mucking with the ant installation: <taskdef name="templateConvertor" classname="org.actionframework.engines.velocity.convert.TemplateConvertorAntTask"> <classpath> <pathelement location="lib/TemplateConvertor.jar"/> <pathelement location="${Velocity.home}/velocity-1.3.1-rc2.jar"/> <pathelement location="lib/jakarta-oro-2.0.5.jar"/> </classpath> </taskdef> Speaking of Velocity.home, I think it'd be easier in build.xml and build.properties to just ask for Velocity.jar or Velocity.classpath, rather than hardcoding assumptions about the jar file name. I had to edit build.xml to make ugly things like this: <available file="${Velocity.home}/velocity-1.3.1-rc2.jar" property="Velocity.All"/> <available file="${Velocity.home}/velocity-1.2.jar" property="Velocity.All"/> <available file="${Velocity.home}/velocity-1.1.jar" property="Velocity.All"/> just to get it to run with my recent version of velocity. -mda |