You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Jim Kennedy <ji...@gigaheads.com> on 2003/06/05 22:00:46 UTC

Can EL do contains type string operation

I need to determine if a String contains a certain character, then make a decision about what to display next.  Can EL do something like:

${bean.attr.lastIndexOf('x') > 0}.  I think I already know the answer but I though maybe there was something I hadn't seen yet.  Is there anyway using JSTL tag libs as well?

Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-----------------------------------------------------



Re: Can EL do contains type string operation

Posted by Serge Knystautas <se...@lokitech.com>.
Jim Kennedy wrote:
> I need to determine if a String contains a certain character, then make a decision about what to display next.  Can EL do something like:
> 
> ${bean.attr.lastIndexOf('x') > 0}.  I think I already know the answer but I though maybe there was something I hadn't seen yet.  Is there anyway using JSTL tag libs as well?

JSP 2.0 defines functions in EL, and JSTL 1.1 will define some standard 
functions.  So check this summer once all the specs are finalized, and 
you can find some early implementations like Tomcat 5.0 and Resin 3.0 in 
the meantime. (although I'm not sure of the state of EL and JSTL in 
these early releases yet.)

-- 
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com


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