org.apache.struts2.interceptor
Class CreateSessionInterceptor
java.lang.Object
com.opensymphony.xwork2.interceptor.AbstractInterceptor
org.apache.struts2.interceptor.CreateSessionInterceptor
- All Implemented Interfaces:
- Interceptor, Serializable
public class CreateSessionInterceptor
- extends AbstractInterceptor
This interceptor creates the HttpSession.
This is particular usefull when using the <@s.token> tag in freemarker templates.
The tag do require that a HttpSession is already created since freemarker commits
the response to the client immediately.
Interceptor parameters:
Example:
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="create-session"/>
<interceptor-ref name="defaultStack"/>
<result name="input">input_with_token_tag.ftl</result>
</action>
- Version:
- $Date: 2006-11-06 10:01:43 -0500 (Mon, 06 Nov 2006) $ $Id: CreateSessionInterceptor.java 471756 2006-11-06 15:01:43Z husted $
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
_log
private static final Log _log
CreateSessionInterceptor
public CreateSessionInterceptor()
intercept
public String intercept(ActionInvocation invocation)
throws Exception
- Description copied from class:
AbstractInterceptor
- Override to handle interception
- Specified by:
intercept
in interface Interceptor
- Specified by:
intercept
in class AbstractInterceptor
- Returns:
- the return code, either returned from
ActionInvocation.invoke()
, or from the interceptor itself.
- Throws:
Exception
- any system-level error, as defined in Action.execute()
.
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.