File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Scope of action method in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Scope of action method in struts2" Watch "Scope of action method in struts2" New topic

Scope of action method in struts2

Arjun Murthy

Joined: May 11, 2011
Posts: 10

What is the scope of an action method in struts2? I am guessing it is session based but i would like to know if there is any way to make an action method's scope to be application level.
Joe Ess

Joined: Oct 29, 2001
Posts: 9126

A new instance of an action is created with each HTTP request, so the scope of a method is request. You can access the session by implementing SessionAware.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Scope of action method in struts2
It's not a secret anymore!