File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes accessing session attribute in jsp using struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "accessing session attribute in jsp using struts2" Watch "accessing session attribute in jsp using struts2" New topic
Author

accessing session attribute in jsp using struts2

Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
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

Joined: Sep 29, 2008
Posts: 12617

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: accessing session attribute in jsp using struts2