home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Copyright 1999-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
- <document>
- <header>
- <title>Session Action</title>
- <version>0.1</version>
- <type>Technical document</type>
- <authors>
- <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
- </authors>
- <abstract>This document describes the session action.</abstract>
- </header>
- <body>
- <s1 title="Session Action">
- <p>
- The session action helps in managing the session of a user on
- the server. It can create and terminate a session. The function
- is controlled by a parameter named 'action'.
- </p>
- <p>For more information on session handling and session contexts
- have a look at the <link href="../../developing/webapps/session.html">Session Context documentation</link>.</p>
- <s2 title="Creating a Session">
- <p>
- To create a session (if it not already exists) simply add the
- action in your pipeline:
- </p>
- <source>
- <![CDATA[
- <map:act type="session"/>
- ]]>
- </source>
- <p>This is the equivalent to specify the 'action' parameter
- with the value 'create':</p>
- <source>
- <![CDATA[
- <map:act type="session">
- <map:parameter name="action" value="create"/>
- </map:act>
- ]]>
- </source>
- </s2>
- <s2 title="Terminating a Session">
- <p>Terminating a session is as easy as creating a session, simply
- add the action to your pipeline and set the 'action' parameter
- to 'terminate':</p>
- <source>
- <![CDATA[
- <map:act type="session">
- <map:parameter name="action" value="terminate"/>
- </map:act>
- ]]>
- </source>
- <p>This terminates the session immediately.</p>
- <p>You can optionally specifiy the 'mode' parameter which controlls
- the termination of the session. You have the choice between
- 'immediately' (the default) and 'if-unsued'. If you use the
- mode 'if-unused', the session is only terminated, if no session
- context exists for the user:</p>
- <source>
- <![CDATA[
- <map:act type="session">
- <map:parameter name="action" value="terminate"/>
- <map:parameter name="mode" value="if-unused"/>
- </map:act>
- ]]>
- </source>
- </s2>
- </s1>
- <s1 title="Configuration">
- <ul>
- <li>Name : session</li>
- <li>Class: org.apache.cocoon.webapps.session.acting.SessionAction</li>
- </ul>
- </s1>
- </body>
- </document>
-