|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.struts.DelegatingActionUtils
public abstract class DelegatingActionUtils
Common methods for letting Struts Actions work with a Spring WebApplicationContext.
As everything in Struts is based on concrete inheritance, we have to provide an Action subclass (DelegatingActionProxy) and two RequestProcessor subclasses (DelegatingRequestProcessor and DelegatingTilesRequestProcessor). The only way to share common functionality is a utility class like this one.
DelegatingActionProxy
,
DelegatingRequestProcessor
,
DelegatingTilesRequestProcessor
Field Summary | |
---|---|
protected static Log |
logger
|
Constructor Summary | |
---|---|
DelegatingActionUtils()
|
Method Summary | |
---|---|
static String |
determineActionBeanName(ActionMapping mapping)
Default implementation of Action bean determination, taking the mapping path and prepending the module prefix, if any. |
static WebApplicationContext |
findRequiredWebApplicationContext(ActionServlet actionServlet,
ModuleConfig moduleConfig)
Find most specific context available: check ContextLoaderPlugIn's WebApplicationContext first, fall back to root WebApplicationContext else. |
static WebApplicationContext |
getRequiredWebApplicationContext(ActionServlet actionServlet,
ModuleConfig moduleConfig)
Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext. |
static WebApplicationContext |
getWebApplicationContext(ActionServlet actionServlet,
ModuleConfig moduleConfig)
Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Log logger
Constructor Detail |
---|
public DelegatingActionUtils()
Method Detail |
---|
public static WebApplicationContext getWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig)
Checks for a module-specific context first, falling back to the context for the default module else.
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig (can be null
)
null
if noneContextLoaderPlugIn.SERVLET_CONTEXT_PREFIX
public static WebApplicationContext getRequiredWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException
Checks for a module-specific context first, falling back to the context for the default module else.
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig (can be null
)
IllegalStateException
- if no WebApplicationContext could be foundContextLoaderPlugIn.SERVLET_CONTEXT_PREFIX
public static WebApplicationContext findRequiredWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException
When checking the ContextLoaderPlugIn context: checks for a module-specific context first, falling back to the context for the default module else.
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig (can be null
)
IllegalStateException
- if no WebApplicationContext could be foundgetWebApplicationContext(org.apache.struts.action.ActionServlet, org.apache.struts.config.ModuleConfig)
,
WebApplicationContextUtils.getRequiredWebApplicationContext(javax.servlet.ServletContext)
public static String determineActionBeanName(ActionMapping mapping)
mapping
- the Struts ActionMapping
ActionConfig.getPath()
,
ModuleConfig.getPrefix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |