• Post Reply Bookmark Topic Watch Topic
  • New Topic

Fetching from the session

 
Joe Martin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming ..
you are inserting the attribute in the session as

session.setAttribute(session.getId(), sessionObject);

Then how to get the sessionManager object in the JSP/JSTL ??
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65529
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would use the session is as a key?
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general given a sessionAttributeName, the answer would be ${sessionScope.sessionAttributeName} or ${sessionScope['sessionAttributeName']}

If you use the session id as the attribute name, then I guess the answer would be ${sessionScope[pageContext.session.id]}

But I also wonder why you would do such a thing

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!