tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <flame...@gmail.com>
Subject Re: Is it possible to create a custom JSTL function using a tag file
Date Tue, 13 Oct 2009 04:45:33 GMT
Was hoping people would overlook that typo :)

I meant custom EL function.

Hopefully there will also be some tag flies in the Extended Taglib,
definitely seems a nicer way to write than in Java, but I've not
written many in anger so not sure of any surprises.

Hen

On Mon, Oct 12, 2009 at 2:10 PM, Stuart Thiel <stuart.thiel@gmail.com> wrote:
> Ahhh, tag files is something I hadn't head of before. This example shows a
> simple one being used:
> http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags5.html
>
> I'm still not sure what you meant by "custom JSTL function", though.
>
>
> Henri Yandell wrote:
>>
>> The following is an example btw:
>>
>> http://svn.apache.org/repos/asf/tomcat/taglibs/extended/trunk/
>>
>> Currnetly it exposes various Commons Lang functions to JSTL using tag
>> functions.
>>
>> Hen
>>
>> On Mon, Oct 12, 2009 at 12:04 PM, Stuart Thiel <stuart.thiel@gmail.com>
>> wrote:
>>
>>>
>>> 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:
>>> http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html
>>>
>>> Stuart
>>>
>>> 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: taglibs-user-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: taglibs-user-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: taglibs-user-help@tomcat.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: taglibs-user-help@tomcat.apache.org
>
>

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


Mime
View raw message