DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15547>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15547 Velocity resource problems using Jboss-3.0.4_Tomcat-4.0.6 bundle Summary: Velocity resource problems using Jboss-3.0.4_Tomcat- 4.0.6 bundle Product: Velocity Version: 1.3-rc1 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Build AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] I am using the velocity-tools (0.6) and Struts (1.02) to build an application that will run in JBoss. I subclassed VelocityViewServlet to perform some specific startup functions. JBoss does not unpack WARs and some references were returning java.io.FileNotFound errors. I tracked the problem to VelocityServlet.loadConfiguration(ServletConfig config). The following worked for me: I changed this code fragment from this Properties p = new Properties(); if ( propsFile != null ) { String realPath = getServletContext().getRealPath(propsFile); if ( realPath != null ) { propsFile = realPath; } p.load( new FileInputStream(propsFile) ); } return p; to this Properties p = new Properties(); if ( propsFile != null ) { InputStream is = getClass().getClassLoader().getResourceAsStream ( propsFile ); p.load( is ); } return p; No other external settings/configurations worked until this change was made. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
