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 Stefan <ni...@studioweb.com> on 2002/10/11 06:26:27 UTC

Re: Is there a way to call java.lang.String.substring on a
Hi,

This Strings taglib is not part of JSTL right? And if this is so I guess
JSTL does not include this sort of string manipulation capability?


Thanks
----- Original Message -----
From: "Tim Kettering" <ti...@mac.com>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Friday, October 11, 2002 12:17 AM
Subject: Re: Is there a way to call java.lang.String.substring on a <c:out ?


>
> http://jakarta.apache.org/taglibs/doc/string-doc/intro.html
>
> I'd suggest using the Strings taglib.  Its really very nice, and comes
with
> a whole lot of other goodies you can use as well, rather than making a
> one-off bean method that does the same thing.
>
> <str:substring start="4" end="8">
> <c:out value="${param.name}"/></str:substring>
>
> Or something like that.
>
>
> > So I would wrap the <c:out  value="${}}"/> tag with a JSTL string taglib
or
> > perhaps a bean method that returns a string like so:
> >
> > <%=  myBean.myStringMethod(<c:out  value="${param.name}}"/>) %>
> >
> >
> > Thanks
> >
> >
> > ----- Original Message -----
> > From: "Shawn Bayern" <ba...@essentially.net>
> > To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
> > Sent: Thursday, October 10, 2002 11:36 PM
> > Subject: Re: Is there a way to call java.lang.String.substring on a <c:
out
> > ?
> >
> >
> >> On Thu, 10 Oct 2002, Stefan wrote:
> >>
> >>> So is there a way to extract a sub string from the result of a <c:out
> >>> value="${}}"/> tag?
> >>
> >> No, not alone; you'd need to use the String Taglib or handle it with a
> >> servlet or other custom Java logic (e.g., a bean or servlet).
> >>
> >> --
> >> Shawn Bayern
> >> "JSTL in Action"   http://www.jstlbook.com
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> >> For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
>
> --
> Tim Kettering
> timster@mac.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>