Apache Struts 2 Documentation > Home > Guides > Core Developers Guide > Interceptors > Servlet Config Interceptor
Added by digi9ten, last edited by Ted Husted on Sep 10, 2006  (view change)
Content pulled from external source. Click here to refresh.

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:

  • ServletContextAware
  • ServletRequestAware
  • ServletResponseAware
  • ParameterAware
  • SessionAware
  • ApplicationAware
  • PrincipalAware

Parameters

Content pulled from external source. Click here to refresh.

  • None

Extending the Interceptor

Content pulled from external source. Click here to refresh.

There are no known extension points for this interceptor.

Examples

Content pulled from external source. Click here to refresh.
<action name="someAction" class="com.examples.SomeAction">
    <interceptor-ref name="servlet-config"/>
    <interceptor-ref name="basicStack"/>
    <result name="success">good_result.ftl</result>
</action>