tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan" <ni...@studioweb.com>
Subject Re: Is there a way to call java.lang.String.substring on a <c: out ?
Date Fri, 11 Oct 2002 02:15:42 GMT
Shawn,

So is there a way to extract a sub string from the result of a <c:out
value="${}}"/> tag?

Thanks,

Stef




----- Original Message -----
From: "Shawn Bayern" <bayern@essentially.net>
To: "Tag Libraries Users List" <taglibs-user@jakarta.apache.org>
Sent: Thursday, October 10, 2002 9:01 PM
Subject: Re: Is there a way to call java.lang.String.substring on a <c: out
?


> On Thu, 10 Oct 2002, Stefan wrote:
>
> > Hi,
> >
> > I would like to use substring on a c: out like so:
> >
> >
>
> No, this can't be done in JSTL 1.0.  You'll be able to define functions in
> the EL in JSP 2.0, but for now, any attempt to do so should yield a
> translation-time error, as the syntax isn't supported.
>
> > It works but at the same time I get this error:
> >
> > 500 Servlet Exception
> > java.lang.reflect.InvocationTargetException
> > at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
> > at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at com.caucho.el.MethodExpr.evalObject(MethodExpr.java:105)
>
> You might want to mail the Caucho folks and ask them about this; their
> implementation is different from Jakarta Taglibs's.  Note again that it
> *shouldn't* work; if it does, then an implementation isn't JSTL-compliant.
>
> You can use other tag libraries like the String Taglib to perform string
> manipulation in your JSP pages.
>
> --
> Shawn Bayern
> "JSTL in Action"   http://www.jstlbook.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:taglibs-user-help@jakarta.apache.org>
>


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


Mime
View raw message