Thanks for the help, James. I tried adding the following to my web.xml (and
putting the velocity.properties file in that location). Does this look right
to you?

    <servlet>
        <servlet-name>ClientApplication</servlet-name>
        <servlet-class>wicket.protocol.http.WicketServlet</servlet-class>
        <init-param>
          <param-name>applicationClassName</param-name>
          <param-value>com.foo.bar.client.ClientApplication</param-value>
        </init-param>
        <init-param>
                <param-name>configuration</param-name>
                <param-value>development</param-value>
        </init-param>
        <init-param>
                <param-name>velocityPropertiesFolder</param-name>
                <param-value>WEB-INF/classes</param-value>
        </init-param>
        <init-param>
                <param-name>velocity.properties</param-name>
                <param-value>velocity.properties</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>


James McLaughlin-3 wrote:
> 
> On Jan 21, 2008 11:45 PM, fattymelt <[EMAIL PROTECTED]> wrote:
>>
>> Just to be sure...
>>
>> In the Wicket section of web.xml I am going to add the two init-params.
>> One
>> of which defines the folder in which to find my properties file, and the
>> other is the actual filename. Then I can use that properties file to
>> specify
>> what my TEMPLATE_ROOT is.
> 
> Yes, that should do it.
> 
>>
>> The only I don't get, is that I have working templates now that are in
>> WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them.
>> So
>> I'm not sure why the "parse" directive isn't looking there, too?
> 
> For some reason, the velocity.properties that comes with
> wicket-velocity specifies the root as "." . It probably would have
> been better left as the default, which behaves as you would expect.
> Maybe if you provide the full path to the template you are parsing,
> the classpath loader will pick it up. Hope this helps, fattymelt.
> 
>>
>>
>> James McLaughlin-3 wrote:
>> >
>> > fattymelt,
>> > It used to work that you could jar up your templates and put them
>> > under WEB-INF/lib. If that doesn't work, create your own
>> > velocity.properties file and define the init-params
>> > velocityPropertiesFolder and velocity.properties in your web.xml. You
>> > can define there which loaders to use and what root the
>> > FileResourceLoader should use. Best of luck, fattymelt!
>> >
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15019014.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to