• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get session attributes inside a SimpleTag?

 
nitin pai
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I get session attributes inside the doTag() method of a SimpleTag?

SimpleTagSupport class has a provision for getting the JspContext object but there is no getSession() in the JspContext interface!!

If only there was a pageContext object in the SimpleTagSupport class the session attributes would have been accessed easily since pageContext has a getSession() method. But pageContext is only available in the Classic Tags.

Any clues on this?
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitin,





Thanks,
 
nitin pai
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Chandra
[ July 05, 2007: Message edited by: nitin pai ]
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!