tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Thiel <>
Subject Re: Is it possible to create a custom JSTL function using a tag file
Date Mon, 12 Oct 2009 19:04:41 GMT
Hello Marcel,

If I understand you correctly, then it is not exactly possible to do 
what you'd like.

More specifically, I believe you're talking about making an EL function 
(vs. JSTL which is a set of third party tags/functions). You can use any 
public static method in any class for this, so it doesn't need to be 
special in any way, but you do need to define it in a tag library so 
that a JSP page knows how to find it. You can isolate a bunch of your 
utility EL functions in their own tag library with their own prefix to 
avoid polluting your main tag libraries, but I would generally organize 
by cohesion instead (putting related tags and functions together in the 
same tag libraries, following the same approach one might do with OO 
class creation).

I haven't read all of this, but skimming it seemed to satisfy me that 
the basics are covered:


Marcel Overdijk wrote:
> I'm wondering  if it is possible to create a custom JSTL function using a tag
> file (so not using a tld and tag class).
> Any reference to an example would be helpful.
> Cheers,
> Marcel

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

View raw message