The moose likes Struts and the fly likes struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts" Watch "struts" New topic


Satya Dasari

Joined: Apr 25, 2008
Posts: 1
I am beginner in struts.I am trying to store values in a session.anybody pls help
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33122

Welcome to JavaRanch!

Every Struts action has the HttpRequest passed in the execute method. You can use request.getSession() to get the session.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
The preferred method is to implement SessionAware interface. For more details, please refer to this.

SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
I agree. Here's the link:
subject: struts
It's not a secret anymore!