struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Newfield <>
Subject Re: [struts] tag writers resources?
Date Mon, 28 Jan 2008 20:08:10 GMT
Darren James wrote:
> What I was more interested in is some guidelines similar to what
> Joachim posted in writing a "struts2" tag.  And by that I mean one of
> those generic, technology independent beasts that can be used in
> Freemarker and Velocity as well as JSP.

I don't know how one writes freemarker tags or velocity tags.  I haven't 
studied Joachim's example in detail, but it didn't appear to be 
answering your question.  It appeared to me that it was an example of 
"how to write a tag that is implemented by freemarker" rather than "how 
to write a tag that is callable from freemarker".

If you're going to have a theme system, and want to be able to swap out 
templates at will, this is a reasonable solution.  If you just want a 
standard tag, I see no reason to call on a templating system inside the tag.

You should also be aware that the simplest way to implement a 
templatable tag (using jsp) is using a .tag file and a tagdir.  No java 
code required.


P.S.:  Potentially useful pages if you need to call this tag from 
freemarker or velocity:

P.P.S:  If your question is really "how do i evaluate tag arguments that 
are really ognl expressions, then TagUtils.getStack() is probably what 
you're looking for:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message