Generated by
JDiff

org.springframework.web.struts Documentation Differences

This file contains all the changes in documentation in the package org.springframework.web.struts as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class ActionSupport

Convenience class for Spring-aware Struts 1.1+ Actions.

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 Struts DispatchActions or Lookup/MappingDispatchActions, use the analogous DispatchActionSupport or LookupDispatchActionSupport / MappingDispatchActionSupport class, respectively.

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. @author Juergen Hoeller @since 1.0.1 @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE @see org.springframework.web.context.ContextLoaderListener @see org.springframework.web.context.ContextLoaderServlet @see DispatchActionSupport @see LookupDispatchActionSupport @see MappingDispatchActionSupport @see DelegatingActionProxy @see DelegatingRequestProcessor @deprecated as of Spring 3.0


Class ContextLoaderPlugIn

Struts 1.1+ PlugIn that loads a Spring application context for the Struts ActionServlet. This context will automatically refer to the root WebApplicationContext (loaded by ContextLoaderListener/Servlet) as parent.

The default namespace of the WebApplicationContext is the name of the Struts ActionServlet, suffixed with "-servlet" (e.g. "action-servlet"). The default location of the XmlWebApplicationContext configuration file is therefore "/WEB-INF/action-servlet.xml".

 <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"/>
The location of the context configuration files can be customized through the "contextConfigLocation" setting, analogous to the root WebApplicationContext and FrameworkServlet contexts.
 <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
   <set-property property="contextConfigLocation" value="/WEB-INF/action-servlet.xml /WEB-INF/myContext.xml"/>
 </plug-in>
Beans defined in the ContextLoaderPlugIn context can be accessed from conventional Struts Actions, via fetching the WebApplicationContext reference from the ServletContext. ActionSupport and DispatchActionSupport are pre-built convenience classes that provide easy access to the context.

It is normally preferable to access Spring's root WebApplicationContext in such scenarios, though: A shared middle tier should be defined there rather than in a ContextLoaderPlugin context, for access by any web component. ActionSupport and DispatchActionSupport autodetect the root context too.

A special usage of this PlugIn is to define Struts Actions themselves as beans, typically wiring them with middle tier components defined in the root context. Such Actions will then be delegated to by proxy definitions in the Struts configuration, using the DelegatingActionProxy class or the DelegatingRequestProcessor.

Note that you can use a single ContextLoaderPlugIn for all Struts modules. That context can in turn be loaded from multiple XML files, for example split according to Struts modules. Alternatively, define one ContextLoaderPlugIn per Struts module, specifying appropriate "contextConfigLocation" parameters.

Note: The idea of delegating to Spring-managed Struts Actions originated in Don Brown's Spring Struts Plugin. ContextLoaderPlugIn and DelegatingActionProxy constitute a clean-room implementation of the same idea, essentially superseding the original plugin. Many thanks to Don Brown and Matt Raible for the original work and for the agreement to reimplement the idea in Spring proper! @author Juergen Hoeller @since 1.0.1 @see #SERVLET_CONTEXT_PREFIX @see ActionSupport @see DispatchActionSupport @see DelegatingActionProxy @see DelegatingRequestProcessor @see DelegatingTilesRequestProcessor @see org.springframework.web.context.ContextLoaderListener @see org.springframework.web.context.ContextLoaderServlet @see org.springframework.web.servlet.FrameworkServlet @deprecated as of Spring 3.0


Class DispatchActionSupport

Convenience class for Spring-aware Struts 1.1+ DispatchActions.

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 or Lookup/MappingDispatchActions, use the analogous ActionSupport or LookupDispatchActionSupport / MappingDispatchActionSupport class, respectively.

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. @author Juergen Hoeller @since 1.0.1 @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE @see org.springframework.web.context.ContextLoaderListener @see org.springframework.web.context.ContextLoaderServlet @see ActionSupport @see LookupDispatchActionSupport @see MappingDispatchActionSupport @see DelegatingActionProxy @see DelegatingRequestProcessor @deprecated as of Spring 3.0


Class LookupDispatchActionSupport

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. @author Juergen Hoeller @since 1.1 @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX @see WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE @see org.springframework.web.context.ContextLoaderListener @see org.springframework.web.context.ContextLoaderServlet @see ActionSupport @see DispatchActionSupport @see MappingDispatchActionSupport @see DelegatingActionProxy @see DelegatingRequestProcessor @deprecated as of Spring 3.0


Class MappingDispatchActionSupport

Convenience class for Spring-aware Struts 1.2 MappingDispatchActions.

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 LookupDispatchActions, use the analogous ActionSupport or DispatchActionSupport / LookupDispatchActionSupport 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. @author Juergen Hoeller @since 1.1.3 @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX @see WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE @see org.springframework.web.context.ContextLoaderListener @see org.springframework.web.context.ContextLoaderServlet @see ActionSupport @see DispatchActionSupport @see LookupDispatchActionSupport @see DelegatingActionProxy @see DelegatingRequestProcessor @deprecated as of Spring 3.0