| org.apache.struts2.interceptor.ServletConfigInterceptor
ServletConfigInterceptor | public class ServletConfigInterceptor extends AbstractInterceptor implements StrutsStatics(Code) | |
An interceptor which sets action properties based on the interfaces an action implements. For example, if the action
implements
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:
Interceptor parameters:
Extending the interceptor:
There are no known extension points for this interceptor.
Example code:
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="servlet-config"/>
<interceptor-ref name="basicStack"/>
<result name="success">good_result.ftl</result>
</action>
See Also: ServletContextAware See Also: ServletRequestAware See Also: ServletResponseAware See Also: ParameterAware See Also: SessionAware See Also: ApplicationAware See Also: PrincipalAware |
Method Summary | |
public String | intercept(ActionInvocation invocation) Sets action properties based on the interfaces an action implements. |
intercept | public String intercept(ActionInvocation invocation) throws Exception(Code) | | Sets action properties based on the interfaces an action implements. Things like application properties,
parameters, session attributes, etc are set based on the implementing interface.
Parameters: invocation - an encapsulation of the action execution state. throws: Exception - if an error occurs when setting action properties. |
|
|