Re: [Actionframework-users] How to configure velocity?
Status: Inactive
Brought to you by:
ptoman
|
From: Petr T. <Pet...@pi...> - 2003-02-22 16:29:39
|
> I found the problem myself: I'm used to set the
> velocity.properties-file as a context-param, which is no problem in
> using "pure" velocity and saves a little bit of typing. ActionServlet
> seems to ignore context-parameters and expects every property to be
> set as an init-parameter. Well, ok. But since this behaviour is not
> completely consistent with using velocity directly, I believe it
> should be documented.
You can use Velocity.properties with AS. Here is a piece of web.xml:
<servlet>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>org.actionframework.ActionServlet</servlet-class>
<init-param>
<param-name>ActionConfig</param-name>
<param-value>LoginServlet.xml</param-value>
</init-param>
<init-param>
<param-name>ActionEngine</param-name>
<param-value>Velocity</param-value>
</init-param>
<init-param>
<param-name>properties</param-name>
<param-value>WEB-INF/classes/Velocity.properties</param-value>
</init-param>
</servlet>
Path for Velocity.properties can be relative to servlet context
(like above) or absolute.
You are right that this is missing in the Spec - will be there in
the next release - thank you! :)
-Petr
--
[ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ]
|