Tuesday, June 5, 2007

Accessing Session

1. Make your Action implement the SessionAware interface.

2. Define a class variable for session Map
private Map session;

3. Define setSession() and getSession() methods.

4. Calling getSession() gives you access to session attributes through the above defined session Map. Any changes made to the session Map are reflected in the HttpSessionRequest object.

No comments: