java.lang.Object | ||
↳ | LookupDispatchAction | |
↳ | org.springframework.web.struts.LookupDispatchActionSupport |
This class is deprecated.
as of Spring 3.0
Convenience class for Spring-aware Struts 1.1+ LookupDispatchActions.
Provides a reference to the current Spring application context, e.g. for bean lookup or resource loading. Auto-detects a ContextLoaderPlugIn context, falling back to the root WebApplicationContext. For typical usage, i.e. accessing middle tier beans, use a root WebApplicationContext.
For classic Struts Actions, DispatchActions or MappingDispatchActions,
use the analogous ActionSupport
or
DispatchActionSupport
/
MappingDispatchActionSupport
class.
As an alternative approach, you can wire your Struts Actions themselves
as Spring beans, passing references to them via IoC rather than looking
up references in a programmatic fashion. Check out
DelegatingActionProxy
and
DelegatingRequestProcessor
.
SERVLET_CONTEXT_PREFIX
ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
ContextLoaderListener
ActionSupport
DispatchActionSupport
MappingDispatchActionSupport
DelegatingActionProxy
DelegatingRequestProcessor
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Initialize the WebApplicationContext for this Action.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a MessageSourceAccessor for the application context
used by this object, for easy message access.
| |||||||||||
Return the current ServletContext.
| |||||||||||
Return the temporary directory for the current web application,
as provided by the servlet container.
| |||||||||||
Return the current Spring WebApplicationContext.
| |||||||||||
Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext,
falling back to the root WebApplicationContext (the usual case).
| |||||||||||
Callback for custom destruction when the ActionServlet shuts down.
| |||||||||||
Callback for custom initialization after the context has been set up.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Initialize the WebApplicationContext for this Action. Invokes onInit after successful initialization of the context.
Return a MessageSourceAccessor for the application context used by this object, for easy message access.
Return the current ServletContext.
Return the temporary directory for the current web application, as provided by the servlet container.
Return the current Spring WebApplicationContext.
Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext, falling back to the root WebApplicationContext (the usual case).
actionServlet | the associated ActionServlet |
---|
IllegalStateException | if no WebApplicationContext could be found |
---|
Callback for custom destruction when the ActionServlet shuts down.
Callback for custom initialization after the context has been set up.