[ https://issues.apache.org/jira/browse/VELOCITY-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henning Schmiedehausen closed VELOCITY-119. ------------------------------------------- > Velocity resource problems using Jboss-3.0.4_Tomcat-4.0.6 bundle > ---------------------------------------------------------------- > > Key: VELOCITY-119 > URL: https://issues.apache.org/jira/browse/VELOCITY-119 > Project: Velocity > Issue Type: Bug > Components: Build > Affects Versions: 1.3-rc1 > Environment: Operating System: All > Platform: PC > Reporter: Fred Moulden > Assigned To: Velocity-Dev List > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]