On Wed, Aug 26, 2009 at 7:39 AM, Nathan Bubna<nbu...@gmail.com> wrote: > I'm not set up to easily test Tomcat 5 or 5.5 right now (this machine > only has 6.0 at the moment). Here's some standard questions: > > Are you sure that your properties are being loaded? > What version of VelocityTools are you using?
Ah, i just saw, 1.1. That's quite old... > And a non-standard one: > > Perhaps Tomcat 5.5 isn't fond of '.' in paths. Have you tried: > > webapp.resource.loader.path = /, /email > > On Wed, Aug 26, 2009 at 3:54 AM, Manish<prol...@gmx.net> wrote: >> I had a very strange experience and few stressful hours after shifting to >> Tomcat 5.5 recently. I still haven't understood the reasons, though I >> resolved the problem myself. Here is an attempt to understand reasons behind >> this dreaded ResourceNotFoundException when almost everything you have >> configured seems to be fine, moreover it was working for good 5 years! :) >> >> This is what I have in velocity.proeprties file kept under WEB-INF - >> >> # $Id: velocity.properties 649 2005-02-18 07:32:03Z manishh $ >> velocimacro.library.autoreload=true >> velocimacro.library=/VM_global_library.vm >> velocimacro.permissions.allow.inline=true >> file.resource.loader.cache=false >> >> # Filepath for error template, >> # relative to web application root directory >> tools.view.servlet.error.template = default/error.vm >> >> # Directory for layout templates, >> # relative to web application root directory >> tools.view.servlet.layout.directory = layout/ >> >> # Filepath of the default layout template >> # relative to the layout directory >> # NOT relative to the root directory of the webapp! >> tools.view.servlet.layout.default.template = Default.vm >> >> # set some path properties now >> >> webapp.resource.loader.path = ., ./email >> >> The servlet is configured correctly - >> >> <servlet> >> <servlet-name>velocity</servlet-name> >> <servlet-class> >> org.apache.velocity.tools.view.servlet.VelocityLayoutServlet >> </servlet-class> >> <init-param> >> <param-name>org.apache.velocity.toolbox</param-name> >> <param-value>/WEB-INF/toolbox.xml</param-value> >> </init-param> >> <init-param> >> <param-name>org.apache.velocity.properties</param-name> >> <param-value>/WEB-INF/velocity.properties</param-value> >> </init-param> >> <load-on-startup>1</load-on-startup> >> </servlet> >> >> All this was working fine under Tomcat 5.0.28 but when I switched to Tomcat >> 5.5.28, it suddenly started showing "ResourceNotFoundException" for the VTL >> files. when I switched back to Tomcat 5.0.28, it worked fine!!!!!!!! What >> exactly is happening here? I am running Win XP and Velocity tools 1.1. >> >> I am really surprised to see this behaviou r - clearly the issue is with >> "velocity.proeprties" file, but I can't underatand **what** exactly is the >> problem and what should be done to make it work under Tomcat 5.5??? >> >> Any pointers, help would be highly appreciated. >> >> TIA, >> - Manish >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org >> For additional commands, e-mail: user-h...@velocity.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org