struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <hus...@apache.org>
Subject Re: Velocity vs FreeMarker
Date Wed, 01 Nov 2006 22:07:04 GMT
On 11/1/06, frankiestd168 <chanhangfai@hotmail.com> wrote:
> I'm not sure if I understand correctly..
> In Struts2 documents & sample code, it mentions Velocity and FreeMarker,
> both can be used as a template,(i.e. *.vm and *.ftl )

Yes, or you can just use JSPs. The Struts tags are almost identical
regardless. If you don't have a reason to use Velocity or Freemarker
for your pages, then use JSPs.


> Any suggestion, which is better?
> I'm new to Struts2, so, a little confuse what to learn first?

:) Probably not Interceptors :)

People do sometimes write a custom Interceptor, but usullay you don't
have to do this.


> i am following this example..
> http://cwiki.apache.org/confluence/display/WW/Building+Your+Own+Interceptor
>
> At the end, my output in browser is showing ${ses.getAttribute('Greeting')},
> not the actual value.
> Did I miss any setting?

Possibly, but there are a couple of different moving parts in this example.

A good starting point is the bootstrap primer

* http://cwiki.apache.org/WW/bootstrap.html

and the MailReader tour

* http://planetstruts.org/struts2-mailreader/Welcome.do

If someone has a Struts 1 background, the "Migrating" articles should
be helpful

* http://www.infoq.com/articles/migrating-struts-2-part2

* http://StrutsUniversity.org/Migrating%20Tutorial

The WebWork in Action book also applies to Struts 2. We've renamed the
packages and added some new goodies, but it's essentially the same
framework.

- HTH, Ted.
* http://husted.com/struts

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


Mime
View raw message