public class ServletConfigInterceptor extends AbstractInterceptor implements StrutsStatics
ParameterAware
then the action context's parameter map will be set on it.
This interceptor is designed to set all properties an action needs if it's aware of servlet parameters, the
servlet context, the session, etc. Interfaces that it supports are:
ServletContextAware
ServletRequestAware
ServletResponseAware
ParameterAware
RequestAware
SessionAware
ApplicationAware
PrincipalAware
<action name="someAction" class="com.examples.SomeAction"> <interceptor-ref name="servletConfig"/> <interceptor-ref name="basicStack"/> <result name="success">good_result.ftl</result> </action>
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT
Constructor and Description |
---|
ServletConfigInterceptor() |
Modifier and Type | Method and Description |
---|---|
String |
intercept(ActionInvocation invocation)
Sets action properties based on the interfaces an action implements.
|
destroy, init
public String intercept(ActionInvocation invocation) throws Exception
intercept
in interface Interceptor
intercept
in class AbstractInterceptor
invocation
- an encapsulation of the action execution state.Exception
- if an error occurs when setting action properties.Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.