Hi! Yup, its easy to create taglibraries
that will conditionally process/skip their
child content/tags. I beleive many taglibs
out there in the wild do it.

In addition to struts i can mantion the forthcoming JSTL (now only
early access releases are available), jakarta should have (maybe even
several) taglibs of that kind. I guess many many other handmade and
industrial quolity taglibs live now. There are some sites where
you can search for available taglibs, but now I just can't remember
the addresses.


VB> I should think that a tag is the better way...
VB> if you use struts there's a library "logic" which has
VB> a tag <present> in it to test a boolean value.
VB> I think it is also an example of tag creation in the
VB> Sun documentation about J2EE Servers (section JSP or
VB> tag handler, I don't remember).

VB> Hope it helped,
VB> Vincent


VB>  --- Sudarson Roy Pratihar
VB> <[EMAIL PROTECTED]> a �crit : > Date:
VB>  Wed, 6 Mar 2002 10:42:43 +0530
>>
>> Hi All,
>>
>> I have some jsp tags (say <mytag param1 param2/>).
>> Now I want to use it conditionally again and again
>> in my jsp like this:
>>
>> if(someBooleanVariable)
>> {
>>     use <mytag param1="val1" param2="val2"/>
>>     do some other html things
>> }
>>
>> else
>> {
>>     something else
>> }
>>
>> As these things have to be done in a number of place
>> within same jsp, I'm thinking about some method, say
>> myMethod(val1, val2, someBooleanVariable).
>>
>> My question is how can I do this ? Or can I make
>> some other tag that will server the purpose of this
>> method ?
>>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to