Hi,
I have a question about JSTL expressions. Here is my scenario:
I am storing several objects into the users Session using keys that are
defined in a .property file and I want to reference these objects in
JSTL. Here is an example:
The key that will be used to store a Book is defined as a constant in
the BookGlobals.class. So I store a Book object in the users session
with the following in a Struts Action:
session.setAttribute(BookGlobals.BOOK_KEY, book);
I have placed the BookGlobals.BOOK_KEY variable into the ServletContext
so that I can retrieve it like so:
<c:out value="${BOOK_KEY}"/>
However, I cannot figure out how to retrieve the book object from the
session using JSTL and the Expression Language. Any idea on how to
accomplish this. I have tried variations of the following with no luck:
<c:set var="book" value="${sessionScope.BOOK_KEY}"/>
<c:set var="book" value="${sessionScope.[${BOOK_KEY}]}"/>
Im stuck on this one. Any suggestions are appreciated.
Thanks,
John
--
********************************
** John Thorhauer
** Web Developer
** Phoenix Color Corp.
** [EMAIL PROTECTED]
********************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]