You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Caine Lai <ca...@agistics.com> on 2007/04/24 23:46:34 UTC

How do I use Velocity with Struts 2?

I would absolutely LOVE to use Velocity as I have been reading the API
docs and getting acquainted with it.  It seems superior to JSP in every
way.  The syntax is great!

 

The problem is I'm using Struts 2.  I see there appears to be some
plugin hooks to Velocity.  But I'm not able to find any documentation on
how to wire Velocity in with Struts 2.

 

In other words, how do I access the message resource bundles, struts
action errors and action messages, validation messages, etc?

 

I see the documentation for Struts 1, but it seems integration with
Struts 2 is quite different.

 

Any pointers on how to get started with this?  I'm really looking for an
alternative to JSP.

 

Thanks!

Caine 

 


Re: How do I use Velocity with Struts 2?

Posted by Nathan Bubna <nb...@gmail.com>.
Since Struts 2 used WebWork 2 as its starting point, they already have
a lot of Velocity support built in.  Here's a link i found:

http://struts.apache.org/2.0.6/docs/velocity.html

and this is for webwork 2, but i bet a lot of this is the same:

http://demo.raibledesigns.com/ww2tutorial/section02/lesson04-02.vm

And of course, you are welcome to ask any questions about using Velocity here!

On 4/24/07, Caine Lai <ca...@agistics.com> wrote:
> I would absolutely LOVE to use Velocity as I have been reading the API
> docs and getting acquainted with it.  It seems superior to JSP in every
> way.  The syntax is great!
>
>
>
> The problem is I'm using Struts 2.  I see there appears to be some
> plugin hooks to Velocity.  But I'm not able to find any documentation on
> how to wire Velocity in with Struts 2.
>
>
>
> In other words, how do I access the message resource bundles, struts
> action errors and action messages, validation messages, etc?
>
>
>
> I see the documentation for Struts 1, but it seems integration with
> Struts 2 is quite different.
>
>
>
> Any pointers on how to get started with this?  I'm really looking for an
> alternative to JSP.
>
>
>
> Thanks!
>
> Caine
>
>
>
>

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