home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / session-action.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  2.9 KB  |  92 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
  18. <document>
  19.  <header>
  20.   <title>Session Action</title>
  21.   <version>0.1</version>
  22.   <type>Technical document</type>
  23.   <authors>
  24.    <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
  25.   </authors>
  26.   <abstract>This document describes the session action.</abstract>
  27.  </header>
  28.  <body>
  29.   <s1 title="Session Action">
  30.    <p>
  31.     The session action helps in managing the session of a user on
  32.     the server. It can create and terminate a session. The function
  33.     is controlled by a parameter named 'action'.
  34.    </p>
  35.    <p>For more information on session handling and session contexts
  36.       have a look at the <link href="../../developing/webapps/session.html">Session Context documentation</link>.</p>
  37.    <s2 title="Creating a Session">
  38.      <p>
  39.       To create a session (if it not already exists) simply add the
  40.       action in your pipeline:
  41.      </p>
  42. <source>
  43. <![CDATA[
  44.     <map:act type="session"/>
  45. ]]>    
  46. </source>
  47.      <p>This is the equivalent to specify the 'action' parameter
  48.        with the value 'create':</p>
  49. <source>
  50. <![CDATA[
  51.     <map:act type="session">
  52.         <map:parameter name="action" value="create"/>
  53.     </map:act>
  54. ]]>    
  55. </source>
  56.    </s2>
  57.    <s2 title="Terminating a Session">
  58.     <p>Terminating a session is as easy as creating a session, simply
  59.       add the action to your pipeline and set the 'action' parameter
  60.       to 'terminate':</p>
  61. <source>
  62. <![CDATA[
  63.     <map:act type="session">
  64.         <map:parameter name="action" value="terminate"/>
  65.     </map:act>
  66. ]]>    
  67. </source>
  68.      <p>This terminates the session immediately.</p>
  69.      <p>You can optionally specifiy the 'mode' parameter which controlls
  70.         the termination of the session. You have the choice between
  71.         'immediately' (the default) and 'if-unsued'. If you use the
  72.         mode 'if-unused', the session is only terminated, if no session
  73.         context exists for the user:</p>
  74. <source>
  75. <![CDATA[
  76.     <map:act type="session">
  77.         <map:parameter name="action" value="terminate"/>
  78.         <map:parameter name="mode" value="if-unused"/>
  79.     </map:act>
  80. ]]>    
  81. </source>
  82.    </s2>
  83.    </s1>
  84.    <s1 title="Configuration">
  85.    <ul>
  86.     <li>Name : session</li>
  87.     <li>Class: org.apache.cocoon.webapps.session.acting.SessionAction</li>
  88.    </ul>
  89.   </s1>
  90.  </body>
  91. </document>
  92.