aspose file tools*
The moose likes Struts and the fly likes How to SET and GET session objects in Struts Action classes ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to SET and GET session objects in Struts Action classes ???" Watch "How to SET and GET session objects in Struts Action classes ???" New topic
Author

How to SET and GET session objects in Struts Action classes ???

Steve Adam
Ranch Hand

Joined: Jan 07, 2009
Posts: 40
Hi
Please tell me how can I SET and GET session objects in Struts Action classes ?


Its not what you do, its how well you do it.
ganta gopal
Greenhorn

Joined: Feb 05, 2009
Posts: 15
HI,

I suppose you are working on struts2.
Two ways to do

a) Make your action class to implement SessionAware interface and implement the setSession method.
b) Using ServletActionContext i,e HttpSession session = ServletActionContext.getSession();



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to SET and GET session objects in Struts Action classes ???