| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You 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. |
| --> |
| |
| <!-- CVS $Id$ --> |
| |
| <xsp:page language="java" |
| xmlns:xsp="http://apache.org/xsp" |
| xmlns:xsp-session="http://apache.org/xsp/session/2.0" |
| create-session="yes"> |
| |
| <page> |
| |
| <p>Adding attribute attr1='Test Value!'.</p> |
| <xsp-session:set-attribute name="attr1">Test value!</xsp-session:set-attribute> |
| <p>Set max inactive interval to 500</p> |
| <xsp-session:set-max-inactive-interval interval="500"/> |
| |
| <h1>xsp-session logicsheet output</h1> |
| |
| <table border="1"> |
| <tr> |
| <th>Logicsheet tag</th><th>Output</th></tr> |
| <tr> |
| <td>get-session-id</td><td><xsp-session:get-session-id/></td></tr> |
| <tr> |
| <td>get-attribute</td><td><xsp-session:get-attribute name="attr1"/></td></tr> |
| <tr> |
| <td>get-attribute-names</td><td><xsp:expr><xsp-session:get-attribute-names as="array"/></xsp:expr></td></tr> |
| <tr> |
| <td>get-creation-time</td><td><xsp-session:get-creation-time/></td></tr> |
| <tr> |
| <td>get-creation-time (string)</td><td><xsp-session:get-creation-time as="string"/></td></tr> |
| <tr> |
| <td>get-id</td><td><xsp-session:get-id/></td></tr> |
| <tr> |
| <td>get-last-accessed-time</td><td><xsp-session:get-last-accessed-time/></td></tr> |
| <tr> |
| <td>get-last-accessed-time (string)</td><td><xsp-session:get-last-accessed-time as="string"/></td></tr> |
| <tr> |
| <td>get-max-inactive-interval</td><td><xsp-session:get-max-inactive-interval/></td></tr> |
| <tr> |
| <td>is-new</td><td><xsp-session:is-new/></td></tr> |
| </table> |
| |
| <h1>xsp-session logicsheet output (as xml)</h1> |
| |
| <textarea cols="100" rows="20"> |
| get-session-id <xsp-session:get-session-id as="xml"/> |
| get-attribute <xsp-session:get-attribute name="attr1" as="xml"/> |
| get-attribute-names <xsp-session:get-attribute-names as="xml"/> |
| get-creation-time <xsp-session:get-creation-time as="xml"/> |
| get-id <xsp-session:get-id as="xml"/> |
| get-last-accessed-time <xsp-session:get-last-accessed-time as="xml"/> |
| get-max-inactive-interval <xsp-session:get-max-inactive-interval as="xml"/> |
| is-new <xsp-session:is-new as="xml"/> |
| encode-url <xsp-session:encode-url href="../"/> |
| form-encode-url <xsp-session:form-encode-url href="../"/> |
| </textarea> |
| |
| |
| <p>Removing attribute attr1</p> |
| <xsp-session:remove-attribute name="attr1"/> |
| <p>Invalidating session</p> |
| <xsp-session:invalidate/> |
| |
| </page> |
| |
| </xsp:page> |