You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Markos Charatzas <xa...@forthnet.gr> on 2005/02/07 16:48:27 UTC

Struts & Velocity

Hi all,

Im just trying to get my head around this. Struts is meant to work with 
actions. You create the mappings of the actions in the struts-config.xml and 
define things like action handlers, forwards, etc.

Suppose I use Velocity to render the view.

Is there a standar place in struts or anywhere else that I can populate the 
velocity context? (Doing it through request.put() of course)

My problem comes when I need to change the Locale for a page which fires up a 
LocaleAction class which then renders the page Ive specified *but* without 
the velocity context being populated since all the logic to populate the 
context is defined in a different class.

In Turbine for example there is method which gets called and serves for 
populating the context.

Thanks for your input.
Markos Charatzas

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts & Velocity

Posted by Markos Charatzas <xa...@forthnet.gr>.
Thanks Joe,

Im aware of the list so I will post there, I just thought it was more of a 
Struts related thing :)

Sorry for that.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts & Velocity

Posted by Joe Germuska <Jo...@Germuska.com>.
Have you checked out http://jakarta.apache.org/velocity/tools/struts/

The community of Struts/Velocity users is quite healthy.  I'm not 
actually one of them, but I bet you'll find that they've got you 
covered if you check out that URL.

Joe


At 5:48 PM +0200 2/7/05, Markos Charatzas wrote:
>Hi all,
>
>Im just trying to get my head around this. Struts is meant to work with
>actions. You create the mappings of the actions in the struts-config.xml and
>define things like action handlers, forwards, etc.
>
>Suppose I use Velocity to render the view.
>
>Is there a standar place in struts or anywhere else that I can populate the
>velocity context? (Doing it through request.put() of course)
>
>My problem comes when I need to change the Locale for a page which fires up a
>LocaleAction class which then renders the page Ive specified *but* without
>the velocity context being populated since all the logic to populate the
>context is defined in a different class.
>
>In Turbine for example there is method which gets called and serves for
>populating the context.
>
>Thanks for your input.
>Markos Charatzas
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org


-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org