|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.tiles.ControllerSupport
org.springframework.web.servlet.view.tiles.ComponentControllerSupport
@Deprecated public abstract class ComponentControllerSupport
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.
WebApplicationObjectSupport
Field Summary | |
---|---|
private MessageSourceAccessor |
messageSourceAccessor
Deprecated. |
private WebApplicationContext |
webApplicationContext
Deprecated. |
Constructor Summary | |
---|---|
ComponentControllerSupport()
Deprecated. |
Method Summary | |
---|---|
protected abstract void |
doPerform(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(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(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 |
Field Detail |
---|
private WebApplicationContext webApplicationContext
private MessageSourceAccessor messageSourceAccessor
Constructor Detail |
---|
public ComponentControllerSupport()
Method Detail |
---|
public final void perform(ComponentContext componentContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException, java.io.IOException
execute
,
converting non-Servlet/IO Exceptions to ServletException.
This is the only execution method available in Struts 1.1.
perform
in interface Controller
perform
in class ControllerSupport
javax.servlet.ServletException
java.io.IOException
execute(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext)
public final void execute(ComponentContext componentContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext) throws java.lang.Exception
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
.
execute
in interface Controller
execute
in class ControllerSupport
java.lang.Exception
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)
protected void initApplicationContext() throws BeansException
ApplicationContextException
- in case of initialization errors
BeansException
- if thrown by application context methodsprotected final ApplicationContext getApplicationContext()
protected final WebApplicationContext getWebApplicationContext()
protected final MessageSourceAccessor getMessageSourceAccessor()
protected final javax.servlet.ServletContext getServletContext()
protected final java.io.File getTempDir()
protected abstract void doPerform(ComponentContext componentContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
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 contextrequest
- current HTTP requestresponse
- current HTTP response
java.lang.Exception
- in case of errorsController.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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |