Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.web.servlet.view.tiles
Class ComponentControllerSupport

    java.lang.Object
      org.apache.struts.tiles.ControllerSupport
          org.springframework.web.servlet.view.tiles.ComponentControllerSupport

All Implemented Interfaces:
  org.apache.struts.tiles.Controller

Deprecated. as of Spring 3.0

    @Deprecated
    public abstract class ComponentControllerSupport

extends org.apache.struts.tiles.ControllerSupport

Convenience class for Spring-aware Tiles component controllers. Provides a reference to the current Spring application context, e.g. for bean lookup or resource loading.

Derives from the Tiles `ControllerSupport` class rather than implementing the Tiles `Controller` interface in order to be compatible with Struts 1.1 and 1.2. Implements both Struts 1.1's `perform` and Struts 1.2's `execute` method accordingly.

Since:
  22.08.2003
Author:
  Juergen Hoeller, Alef Arendsen
See Also:
  `WebApplicationObjectSupport`

Constructor Summary
`ComponentControllerSupport()` Deprecated.

Method Summary
`protected abstract void` | `doPerform(org.apache.struts.tiles.ComponentContext componentContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Deprecated. Perform the preparation for the component, allowing for any Exception to be thrown.
`void` | `execute(org.apache.struts.tiles.ComponentContext componentContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)` Deprecated. This implementation delegates to `doPerform`, lazy-initializing the application context reference if necessary.
`protected ApplicationContext` | `getApplicationContext()` Deprecated. Return the current Spring ApplicationContext.
`protected MessageSourceAccessor` | `getMessageSourceAccessor()` Deprecated. Return a MessageSourceAccessor for the application context used by this object, for easy message access.
`protected javax.servlet.ServletContext` | `getServletContext()` Deprecated. Return the current ServletContext.
`protected java.io.File` | `getTempDir()` Deprecated. Return the temporary directory for the current web application, as provided by the servlet container.
`protected WebApplicationContext` | `getWebApplicationContext()` Deprecated. Return the current Spring WebApplicationContext.
`protected void` | `initApplicationContext()` Deprecated. Subclasses can override this for custom initialization behavior.
`void` | `perform(org.apache.struts.tiles.ComponentContext componentContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)` Deprecated. This implementation delegates to `execute`, converting non-Servlet/IO Exceptions to ServletException.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ComponentControllerSupport

    public ComponentControllerSupport()

  Deprecated.

Method Detail

### perform

    public final void perform(org.apache.struts.tiles.ComponentContext componentContext,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              javax.servlet.ServletContext servletContext)
                       throws javax.servlet.ServletException,
                              java.io.IOException

  Deprecated.
  This implementation delegates to `execute`, converting non-Servlet/IO Exceptions to ServletException.

  This is the only execution method available in Struts 1.1.

  Specified by:
    `perform` in interface `org.apache.struts.tiles.Controller`
  Overrides:
    `perform` in class `org.apache.struts.tiles.ControllerSupport`
  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`
  See Also:
    `execute(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext)`

### execute

    public final void execute(org.apache.struts.tiles.ComponentContext componentContext,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              javax.servlet.ServletContext servletContext)
                       throws java.lang.Exception

  Deprecated.
  This implementation delegates to `doPerform`, lazy-initializing the application context reference if necessary.

  This is the preferred execution method in Struts 1.2. When running with Struts 1.1, it will be called by `perform`.

  Specified by:
    `execute` in interface `org.apache.struts.tiles.Controller`
  Overrides:
    `execute` in class `org.apache.struts.tiles.ControllerSupport`
  Throws:
    `java.lang.Exception`
  See Also:
    `perform(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext)`, `doPerform(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)`

### initApplicationContext

    protected void initApplicationContext()
                                   throws BeansException

  Deprecated.
  Subclasses can override this for custom initialization behavior. Gets called on initialization of the context for this controller.

  Throws:
    `ApplicationContextException` - in case of initialization errors
    `BeansException` - if thrown by application context methods

### getApplicationContext

    protected final ApplicationContext getApplicationContext()

  Deprecated.
  Return the current Spring ApplicationContext.

### getWebApplicationContext

    protected final WebApplicationContext getWebApplicationContext()

  Deprecated.
  Return the current Spring WebApplicationContext.

### getMessageSourceAccessor

    protected final MessageSourceAccessor getMessageSourceAccessor()

  Deprecated.
  Return a MessageSourceAccessor for the application context used by this object, for easy message access.

### getServletContext

    protected final javax.servlet.ServletContext getServletContext()

  Deprecated.
  Return the current ServletContext.

### getTempDir

    protected final java.io.File getTempDir()

  Deprecated.
  Return the temporary directory for the current web application, as provided by the servlet container.

  Returns:
    the File representing the temporary directory

### doPerform

    protected abstract void doPerform(org.apache.struts.tiles.ComponentContext componentContext,
                                      javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response)
                               throws java.lang.Exception

  Deprecated.
  Perform the preparation for the component, allowing for any Exception to be thrown. The ServletContext can be retrieved via getServletContext, if necessary. The Spring WebApplicationContext can be accessed via getWebApplicationContext.

  This method will be called both in the Struts 1.1 and Struts 1.2 case, by `perform` or `execute`, respectively.

  Parameters:
    `componentContext` - current Tiles component context
    `request` - current HTTP request
    `response` - current HTTP response
  Throws:
    `java.lang.Exception` - in case of errors
  See Also:
    `Controller.perform(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext)`, `getServletContext()`, `getWebApplicationContext()`, `perform(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext)`, `execute(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext)`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD