The JSTL EL references JavaBeans properties, collections, and maps.  That's it.  If 
you want to reference a constant, you'll have to have your business or setup logic put 
the constant into a JavaBean property, collection, or map.

> -----Original Message-----
> From: René Zanner [mailto:[EMAIL PROTECTED]
> 
> I have a question regarding usage of Java Constants as attribute values.
> 
> In STRUTS I can do the following:
> 
> <bean:define id="myBean" name="<%= MyConstants.SESSION_OBJECT %>"
> scope="session"/>
> 
> In JSTL, I wanted to do something similar, like:
> 
> <core:set var="myBean" value="${sessionScope.<%=
> MyConstants.SESSION_OBJECT
> %>}"/>
> 
> (I know that the syntax is not correct!)
> 
> It seems that it's not really possible to do something like that with
> JSTL.
> Anyway - does anybody have a hint what's the correct syntax or have a
> work-around to use Java-Constants as attribute names in JSTL?

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

Reply via email to