Or you can even be wierd like me and use your own techniques. I for example am manipulating xhtml DOMs at the server side to insert dynamic data from the beans (and other bean-like things that don't quite follow the bean rules but look bean-ish (naughty naughty! ;->)). Im getting to the stage where some rather sweeping changes to the xhtml layout can be made without touching the source code. On the minus side, there is quite a bit of initial work involved as one doesn't have the rich set of struts tags to leverage when one starts.
This approach has the advantage of nicely seperating my layout and chrome from the java code that inserts dynamic content. -Something JSP (which I regard as the devils work!) doesn't really do no matter how many taglibs you throw at it. (Also has the advantage that when an exception is thrown I can actually find the bit of code that threw it and sometimes even work out why!) >From what Ive been told, Velocity (which is a proper template engine) on the other hand is very good at this sort of thing and well worth a look at. -----Original Message----- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 06:23 To: Struts Users Mailing List Subject: Re: Struts and Velocity (FOR TED) If you are using a MVC architecture, technically, the two are equivalent. JSP tags are designed to expose JavaBeans to the presentation page, and Velocity is designed to the exactly the same thing. Velocity uses a tight, interpreted scripting language. JSP tags are compiled against a standard API. Velocity has View Tools for Struts. JSPs have the HTML taglib. But both technologies are designed to use the same overall strategy. One component creates a data transfer object, and another component (the presentation page) renders it. Which is preferable is up to the people writing the pages. If the pages are being written by Java engineers, then JavaServer Pages are a good way to go. (With Tiles, they are even a great way to go.) If the pages are being written by page designers with tools designed for static HTML, then Velocity can be a better choice. The Velocity View Tools for Struts expose the framework resources as well as the Struts JSP tags do, which makes the whole thing a Coke/Pepsi issue. The important thing is that a versatile framework, like Struts, makes it each to use either or both or switch from one to the other. -- Ted Husted, Husted dot Com, Fairport NY US -- Java Web Development with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Jerome Jacobsen wrote: > > Ted, > > Which presentation technology do you prefer, Velocity or JSP+Struts Tags? > > Why? > > -Jerome > > -----Original Message----- > From: Ted Husted [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 28, 2002 7:14 AM > To: Struts Users Mailing List > Subject: Re: Struts and Velocity > > The Struts Velocity toolset is designed so that you can easily > substitute Velocity "tools" for the Struts taglibs. It's still > prerelease, but very solid. You can get it from the CVS and build it, or > there's a recent snapshot here: > > http://www.husted.com/struts/resources/velstruts.zip > > -- Ted Husted, Husted dot Com, Fairport NY US > -- Java Web Development with Struts > -- Tel: +1 585 737-3463 > -- Web: http://husted.com/about/services > > Michael Delamere wrote: > > > > Thanks, > > > > I will do that. The reason why I asked is because most of the tutorials > > seem to concentrate on using jsps rather than velocity. > > > > Regards, > > > > Michael > > > > ----- Original Message ----- > > From: "Kasinath" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > Sent: Friday, March 29, 2002 5:40 PM > > Subject: Re: Struts and Velocity > > > > > Michael > > > You cam follow documentation provided with struts > > > distribution(struts-documentation.war). Deploy this war into any app > > server > > > or webserver and go thru. > > > Also you can download some of the public reviews posted in > > theserverside.com > > > for struts > > > Kasinath > > > ----- Original Message ----- > > > From: "Michael Delamere" <[EMAIL PROTECTED]> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > > Sent: Friday, June 28, 2002 9:53 AM > > > Subject: Struts and Velocity > > > > > > > > > Hi, > > > > > > could someone direct me to a good tutorial of how to use struts with > > > velocity. > > > > > > Thanks, > > > > > > Michael > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>