com.opensymphony.webwork.interceptor
Class ServletConfigInterceptor

java.lang.Object
  extended bycom.opensymphony.xwork.interceptor.AroundInterceptor
      extended bycom.opensymphony.webwork.interceptor.ServletConfigInterceptor
All Implemented Interfaces:
com.opensymphony.xwork.interceptor.Interceptor, WebWorkStatics

public class ServletConfigInterceptor
extends com.opensymphony.xwork.interceptor.AroundInterceptor
implements WebWorkStatics

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 parametes, the servlet context, the session, etc.

Author:
Patrick Lightbody, Bill Lynch (docs)

Field Summary
 
Fields inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor
log
 
Fields inherited from interface com.opensymphony.webwork.WebWorkStatics
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERLVET_DISPATCHER, SERVLET_CONFIG, SERVLET_DISPATCHER
 
Constructor Summary
ServletConfigInterceptor()
           
 
Method Summary
protected  void after(com.opensymphony.xwork.ActionInvocation dispatcher, String result)
          Does nothing.
protected  void before(com.opensymphony.xwork.ActionInvocation invocation)
          Sets action properties based on the interfaces an action implements.
 
Methods inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor
destroy, init, intercept
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletConfigInterceptor

public ServletConfigInterceptor()
Method Detail

after

protected void after(com.opensymphony.xwork.ActionInvocation dispatcher,
                     String result)
              throws Exception
Does nothing.

Throws:
Exception

before

protected void before(com.opensymphony.xwork.ActionInvocation invocation)
               throws Exception
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.

WebWork Project Page