public class CookieProviderInterceptor extends AbstractInterceptor implements PreResultListener
CookieProvider
You must reference this interceptor in your default stack or in action's stack, see example below.
none
<action ... > <interceptor-ref name="defaultStack"/> <interceptor-ref name="cookieProvider"/> ... </action>
Constructor and Description |
---|
CookieProviderInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addCookiesToResponse(CookieProvider action,
javax.servlet.http.HttpServletResponse response)
Do what name suggests
|
void |
beforeResult(ActionInvocation invocation,
String resultCode)
|
String |
intercept(ActionInvocation invocation)
Override to handle interception
|
destroy, init
public String intercept(ActionInvocation invocation) throws Exception
AbstractInterceptor
intercept
in interface Interceptor
intercept
in class AbstractInterceptor
invocation
- the action invocationActionInvocation.invoke()
, or from the interceptor itself.Exception
- any system-level error, as defined in Action.execute()
.protected void addCookiesToResponse(CookieProvider action, javax.servlet.http.HttpServletResponse response)
action
- CookieProvider
actionresponse
- current HttpServletResponse
public void beforeResult(ActionInvocation invocation, String resultCode)
PreResultListener
beforeResult
in interface PreResultListener
invocation
- the action invocationresultCode
- the result code returned by the action (eg. success
).Copyright © 2000–2020 Apache Software Foundation. All rights reserved.