java.lang.Object | ||
↳ | ControllerSupport | |
↳ | org.springframework.web.servlet.view.tiles.ComponentControllerSupport |
This class is deprecated.
as of Spring 3.0
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 org.apache.struts.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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This implementation delegates to
doPerform ,
lazy-initializing the application context reference if necessary. | |||||||||||
This implementation delegates to
execute ,
converting non-Servlet/IO Exceptions to ServletException. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Perform the preparation for the component, allowing for any Exception to be thrown.
| |||||||||||
Return the current Spring ApplicationContext.
| |||||||||||
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.
| |||||||||||
Subclasses can override this for custom initialization behavior.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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
.
Exception |
---|
This implementation delegates to execute
,
converting non-Servlet/IO Exceptions to ServletException.
This is the only execution method available in Struts 1.1.
IOException | |
---|---|
ServletException |
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.
componentContext | current Tiles component context |
---|---|
request | current HTTP request |
response | current HTTP response |
Exception | in case of errors |
---|
Return the current Spring ApplicationContext.
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.
Subclasses can override this for custom initialization behavior. Gets called on initialization of the context for this controller.
ApplicationContextException | in case of initialization errors |
---|---|
BeansException | if thrown by application context methods |