tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: Best Approaches for passing jstl expressions to other non jstltags
Date Mon, 05 May 2003 15:47:59 GMT

If you're using JSP 2.0 [which you're probably not] you can just use the
variable. JSTL/JSP1.2 is an interim measure so things are a little clunky,
especially when it comes down to working with other taglibs.

The solution will be:

<vls:makecontent audience="${foo.audience}"  id="${id}" />

once JSP 2.0 rolls out into your favourite/just-have-use web container.

Hen

On Mon, 5 May 2003, Brian Hart wrote:

> So there isn't a valid way to use c:out within another tag?  I was
> thinking it was just a matter of escaping my double-quotes correctly.  I
> do have bean-handling scenarios that I would like to avoid having to
> place values in a 'top-level' variable in order to leverage the
> context.getAttribute() solution.
>
> >>> bayard@generationjava.com 05/05/03 11:01AM >>>
>
> The following works for me I think:
>
> <vls:makecontent audience="<%= context.getAttribute("audience") %>"
> id="75" />
>
> Or something akin. Obviously you don't have any bean-handling there,
> so
> you need to use <c:out> to get the value into a top-level variable.
>
> Hen
>
> On Mon, 5 May 2003, Brian Hart wrote:
>
> > What is the correct syntax for populating values of your own custom
> tag
> > properties using c:out.
> > For example:
> > <vls:makecontent audience="PARENTS"  id="75" />
> >
> > When replaced with JSTL expressions I am not getting values
> translated
> > correctly:
> > <vls:makecontent audience='<c:out value="${audience}"/>'  id='<c:out
> > value="${contentID}"/>'  />
> >
> > any info would be appreciated.
> > -Brian
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>


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


Mime
View raw message