File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Steve Adam
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Please tell me how can I SET and GET session objects in Struts Action classes ?

 
ganta gopal
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();



 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic