Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

accessing session attribute in jsp using struts2  RSS feed

 
Nikes Shah
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I am struggling with setting session attribute in struts2 Action class.

when I set attribute in session Map in struts2, it gives NullPointer exception.

I have referred roseindia tutorial but did not succeed in setting and retrieving session attributes.

Thanks for any help.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing what you've already tried it's more difficult to help.

Normally you'd simply implement SessionAware and set the value to the session map.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!