The value of c:out is output to the JspWriter instance for the page at
runtime and as such it would not be possible to do what you are suggesting
from within a jsp page.  As Shawn suggested take a look at the String
taglib.  It actually has a tag called "substring".

regards,

Jungho
----- Original Message -----
From: "Stefan" <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 10:15 PM
Subject: Re: Is there a way to call java.lang.String.substring on a <c: out
?


> 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" <[EMAIL PROTECTED]>
> To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
> 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:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to