Robert Brandner said: > I use velocity-struts (velocity-dep-1.3.1.jar and velocity-tools-1.1.jar). > I configured web.xml as described in the documentation and put the > toolbox.xml, velocity.properties, VM_global_library.vm into the WEB-INF > directory. > > <servlet> > <servlet-name>velocity</servlet-name> > <servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</ser vlet-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>10</load-on-startup> > </servlet>
looks right. > Problem is, if I try to add a further macro-package in > velocity.properties like this: > > velocimacro.library = > /WEB-INF/VM_global_library.vm,/WEB-INF/foobar_library.vm > > the macros defined in foobar_library.vm are not evaluated. > If I put the same macros into the VM_global_library.vm they work. hmm. what happens if you switch the order of those two files in the property? > I think (and read somewhere) that the servlet does not take my > properties file, but falls back to a default file in the jar, where just > the VM_global_library.vm is specified as a macro library. yeah, but if it is only using the default props, then how is it finding your VM_global_library.vm file? the default velocimacro.library property (which comes with the velocity jar and is not overridden by the servlet) should just look for "/VM_global_library.vm" not "/WEB-INF/VM_global_library.vm". so at first glance, it sounds like it is reading your custom properties, but not as expected. > Another strange thing is, that I get no log file, although there should > be a velocity.log file somewhere. not unless you told it to do so in your custom properties. by default, the VelocityViewServlet logs to the servlet engine's logging mechanism. so, if you are using Tomcat, then look in Tomcat's log folder for the day's log file. the velocity and VVS messages should be output there. Nathan Bubna [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
