jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@apache.org
Subject cvs commit: jakarta-taglibs/session/xml session.xml
Date Mon, 09 Jul 2001 02:04:23 GMT
glenn       01/07/08 19:04:23

  Added:       session/xml session.xml
  Log:
  Convert to new build
  
  Revision  Changes    Path
  1.1                  jakarta-taglibs/session/xml/session.xml
  
  Index: session.xml
  ===================================================================
  <?xml version="1.0" ?>
  
  <!-- Change all instances of session with the jakarta-taglib 
       name for this tag library.
  
       Change all instances of Session with the name to use
       for things such as titles in the tag library documentation.
  
       Change all instances of {your-name} with your name for
       for things such as author name in the tag library documentation.
  
       Change <prefix>foo</prefix> below to a short prefix for this
       tag library.
       -->
  
  <document url="./session.xml">
  
  <!-- More properties can be added.  Good place to stick loose
       data needed elsewhere. -->
  <properties>
    <!-- The title here overrides the title generated by the 
         stylesheet for the documentation HTML <title> tag
    <title>Jakarta Project: Session JSP Tag Library</title>
         -->
    <!-- The name here is used in the HTML <meta name="author"...> tag -->
    <author>Glenn Nielsen</author>
  </properties>
  
  <!-- The following defines elements uses both to create the taglib
       documentation and the tag library descriptor .tld file.  The
       elements used are those from the JSP 1.2 TLD DTD and special
       elements used when creating the tagib documentation.  Although
       the JSP1.2 TLD DTD is used, this document can be used to
       generate both a JSP 1.1 and a JSP 1.2 TLD.
       -->
  <taglib>
    <!-- The following elements are from the JSP 1.2 TLD DTD -->
    <!-- Version number of this tagib -->
    <tlib-version>1.0</tlib-version>
    <!-- Minimum version of JSP spec required -->
    <jsp-version>1.1</jsp-version>
    <!-- jakarta-taglib name of this tag library -->
    <short-name>session</short-name>
    <!-- URI of taglib -->
    <uri>http://jakarta.apache.org/taglibs/session-1.0</uri>
    <!-- The name to use in titles, etc. for the taglib -->
    <display-name>Session Tag library (Pre Beta)</display-name>
  
    <description>
  <P>The SESSION JSP tag library provides tags for reading or modifying client
  HttpSession information.
  </P>
  <P>A servlet container uses an HttpSession to store information about a
  clients session on the server. By default a JSP page will create a session for
  a user. The user is tied to the session using either a Cookie or by using URL
  rewriting. This is how you can tie information to a user between multiple HTTP
  requests to your server.
  </P>
  <P>Session Attributes are what makes it possible to store information about a
  clients session between multiple HTTP requests. A session attribute consists of
  a name and value. To save information about a users session on your server use
  the <B>setAttribute</B> tag.
  </P>
  <P>The session attributes you save only exist while the sessions exists.
  Servlet containers will expire a users session and remove it after the user has
  been inactive for a period of time. Many servlet containers default to 30
  minutes. You can change this by using the <B>maxInactiveInterval</B> tag.
  </P>
  <P>A typical example of this is a shopping cart application where you use the
  session to track what items the user wants to purchase. Each time a user
  selects an item to purchase you set a session attribute which contains
  information about the item. Then when the user later checks out, you can
  determine what items they want to purchase by looking at the session
  attributes.
  </P>
    </description> 
  
    <!-- The taglib-location is used to fill in the web.xml configuration
         information in the HTML doc. -->
    <taglib-location>/WEB-INF/session.tld</taglib-location>
  
    <!-- The prefix is used to fill in the taglib directive
         configuration information in the HTML doc. -->
    <prefix>sess</prefix>
  
    <!-- This element must be straight text and is copied right into
         the "Requirements" section of the HTML doc. -->
    <requirements-info>
      This custom tag library requires no software other than a servlet container
      that supports the JavaServer Pages Specification, version 1.1 or higher.  
    </requirements-info>
  
    <tagtoc name="Session Tags">
      <tag>
        <name>session</name> 
        <tag-class>org.apache.taglibs.session.SessionTag</tag-class>
        <tei-class>org.apache.taglibs.session.SessionTEI</tei-class>
        <body-content>empty</body-content>
        <display-name>session</display-name>
  
        <description>
          Used to access general information about session.
        </description>
  
        <summary>Used to access general information about session.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
        <variable>
          <name-from-attribute>id</name-from-attribute>
          <variable-class>org.apache.taglibs.session.SessionData</variable-class>
          <declare>true</declare>
          <scope>AT_BEGIN</scope>
          <description>Session Data Bean</description>
          <availability>1.0</availability>
  
          <beanprop>                             
            <name>creationTime</name>                 
            <get>Yes</get>     
            <set>No</set>      
            <description>
              Returns the time when this session was created, measured in
              milliseconds since midnight January 1, 1970 GMT.
            </description>
            <availability>1.0</availability>
          </beanprop>
          <beanprop>                   
            <name>sessionId</name>              
            <get>Yes</get>    
            <set>No</set>     
            <description>
              Returns the unique identifier assigned to this session.
            </description>
            <availability>1.0</availability>
          </beanprop>
          <beanprop>                   
            <name>lastAccessedTime</name>              
            <get>Yes</get>    
            <set>No</set>     
            <description>
              Returns the last time the client sent a request associated with
              this session as the number of milliseconds since midnight January
              1, 1970 GMT.
            </description>                         
            <availability>1.0</availability>
          </beanprop>
          <beanprop>                   
            <name>maxInactiveInterval</name>              
            <get>Yes</get>    
            <set>No</set>     
            <description>
              Returns the maximum time interval, in seconds, that the servlet
              container will keep this session open between client accesses.
            </description>                         
            <availability>1.0</availability>
          </beanprop>
        </variable>
  
        <attribute>
          <name>id</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Script variable id for use with standard <B>jsp:getProperty</B> tag.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Display the creation time of the session
            </comment>
            <code>
  <![CDATA[
  <sess:session id="ss"/>
  The creation time in milliseconds since midnight January 1, 1970 GMT is:
  <jsp:getProperty name="ss" property="creationTime"/>
  ]]> 
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>isNew</name>
        <tag-class>org.apache.taglibs.session.IsNewTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>isNew</display-name>
  
        <description>
          Used to determine if a session is new.
        </description>
    
        <summary>Used to determine if a session is new.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
        <attribute>
          <name>value</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            If value is set to false the isNew tag includes body of tag
            if session is not new. Default value is true.
          </description>
          <availability>1.0</availability>
        </attribute>
          
        <example>
          <usage>
            <comment>
              Display whether the cients session is new
            </comment>
            <code>
  <![CDATA[ 
  <sess:isNew> 
    This session is new.
  </sess:isNew>
  <sess:isNew value="false">
    This session is not new.
  </sess:isNew>
  ]]>       
            </code>  
          </usage>  
        </example>
            
      </tag>
  
      <tag>
        <name>invalidate</name>
        <tag-class>org.apache.taglibs.session.InvalidateTag</tag-class>
        <body-content>empty</body-content>
        <display-name>invalidate</display-name>
  
        <description>
          Invalidate a user session and remove it.
        </description>
        
        <summary>Invalidate a user session and remove it.</summary>
        <availability>1.0</availability> 
        <restrictions>None</restrictions>
  
        <example>
          <usage>
            <comment>
              Invalidate the users session and remove it
            </comment>
            <code>   
  <![CDATA[      
  <sess:invalidate/>
  ]]>               
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>maxInactiveInterval</name>
        <tag-class>org.apache.taglibs.session.MaxInactiveIntervalTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>maxInactiveInterval</display-name>
    
        <description>
          Sets the max inactive interval in seconds using the content of the
          tag body.
        </description>
  
        <summary>
          Used to set the maximum inactive interval before a session times out.
        </summary> 
        <availability>1.0</availability>                         
        <restrictions>None</restrictions>
  
        <example>                        
          <usage>
            <comment>
              Sets the session maximum inactive interval to 900 seconds
            </comment>
            <code>   
  <![CDATA[         
  <sess:maxInactiveInterval>900</sess:maxInactiveInterval>
  ]]>       
            </code>
          </usage>
        </example>
      
      </tag>
  
    </tagtoc>
  
    <tagtoc name="Session Attribute Tags">
  
      <tag>
        <name>attribute</name>
        <tag-class>org.apache.taglibs.session.AttributeTag</tag-class>
        <body-content>empty</body-content>
        <display-name>attribute</display-name>
  
        <description>
          Used to get the value of a single session attribute.
        </description>
  
        <summary>Used to get the value of a single session attribute.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of session attribute to get.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Output the value of the session attribute with name "test1"
            </comment>
            <code>
  <![CDATA[
  <sess:attribute name="test1"/>
  ]]>
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>attributes</name>
        <tag-class>org.apache.taglibs.session.AttributesTag</tag-class>
        <tei-class>org.apache.taglibs.session.AttributesTEI</tei-class>
        <body-content>JSP</body-content>
        <display-name>attributes</display-name>
  
        <description>
          Used to loop through all session attributes.
        </description>
  
        <summary>Used to loop through all session attributes.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
        <variable>
          <name-from-attribute>id</name-from-attribute>
          <variable-class>org.apache.taglibs.session.AttributesTag</variable-class>
          <declare>true</declare>
          <scope>NESTED</scope>
          <description>Session Attribute Bean</description>
          <availability>1.0</availability>
  
          <beanprop>
            <name>name</name>
            <get>Yes</get>
            <set>No</set>
            <description>
              Session attribute name.
            </description>
            <availability>1.0</availability>
          </beanprop>
          <beanprop>
            <name>value</name>
            <get>Yes</get>
            <set>No</set>
            <description>
              Session attribute value.
            </description>
            <availability>1.0</availability>
          </beanprop>
        </variable>
  
        <attribute>
          <name>id</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Script variable id for use with standard <B>jsp:getProperty</B> tag.
          </description>
          <availability>1.0</availability>
        </attribute>
         
        <example>
          <usage>
            <comment>
              Output the name and value of all the session attributes
            </comment>
            <code>
  <![CDATA[
  <sess:attributes id="loop">
  Name: <jsp:getProperty name="loop" property="name"/>
  Value: <jsp:getProperty name="loop" property="value"/>
  </sess:attributes>
  ]]>    
            </code>
          </usage>
        </example>
         
      </tag>
  
      <tag>
        <name>equalsAttribute</name>
        <tag-class>org.apache.taglibs.session.EqualsAttributeTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>equalsAttribute</display-name>
   
        <description>
          Includes the body of the tag if the session attribute value equals
          the match attribute.
        </description>
   
        <summary>
          See if a session attribute equals some value.
        </summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
   
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of session attribute.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>value</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            If value is set to false the equalsAttribute tag includes body
            of tag if session attribute does not equal the match attribute.
            Default is true.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>match</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            String to test for equality with session attribute value.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>ignoreCase</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Set to <b>true</b> to test for equality while ignoring
            the case of the letters.  Set to <b>false</b> to test
            for case sensitive equality.  Default is <b>false</b>
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Determine if the session attribute "test1" value equals "blah"
            </comment>
            <code>
  <![CDATA[
  <sess:equalsAttribute name="test1" match="blah">
    The session attribute with name test1 matches the string "blah".
  </sess:equalsAttribute>
  <sess:equalsAttribute name="test1" match="blah" value="false">
    The session attribute with name test1 does not match the string "blah".
  </sess:equalsAttribute>
  ]]>
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>existsAttribute</name>
        <tag-class>org.apache.taglibs.session.ExistsAttributeTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>existsAttribute</display-name>
    
        <description>
          Includes the body of the tag if the session attribute exists.
        </description>
    
        <summary>
          Includes the body of the tag if the session attribute exists.
        </summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
    
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of session attribute.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>value</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            If value is set to false the existsAttribute tag includes body
            of tag if session attribute does not exist. Default is true.
          </description>
          <availability>1.0</availability>
        </attribute>
              
        <example>
          <usage>
            <comment>
              Determine if the "test1" Session attribute exists
            </comment>
            <code>
  <![CDATA[
  <sess:existsAttribute name="test1">
   The session attribute with name test1 exists.
  </sess:existsAttribute>
  <sess:existsAttribute name="test1" value="false">
   The session attribute with name test1 does not exist.
  </sess:existsAttribute>
  ]]>         
            </code>
          </usage>
        </example>
           
      </tag>
  
      <tag>
        <name>removeAttribute</name>
        <tag-class>org.apache.taglibs.session.RemoveAttributeTag</tag-class>
        <body-content>empty</body-content>    
        <display-name>removeAttribute</display-name>
  
        <description>
          Removes an attribute from a session.
        </description>
    
        <summary>Removes an attribute from a session.</summary>
        <availability>1.0</availability> 
        <restrictions>None</restrictions>
    
        <attribute>
          <name>name</name> 
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of session attribute to remove.
          </description>
          <availability>1.0</availability>
        </attribute>
        
        <example>
          <usage> 
            <comment>
              Remove the session attribute with name "test1"
            </comment>
            <code>   
  <![CDATA[
  <sess:removeAttribute name="test1"/>
  ]]>
            </code>
          </usage>
        </example>
                 
      </tag>
  
      <tag>
        <name>setAttribute</name>
        <tag-class>org.apache.taglibs.session.SetAttributeTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>setAttribute</display-name>
  
        <description>
          Sets the value of the session attribute to the content of the tag body.
        </description>
   
        <summary>Sets the value of a session attribute.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
    
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of session attribute to set value for.
          </description> 
          <availability>1.0</availability>
        </attribute>
      
        <example>
          <usage>
            <comment>
              Set the session attribute with name "test1"
            </comment> 
            <code>   
  <![CDATA[
  <sess:setAttribute name="test1">Test Value</sess:setAttribute>
  ]]> 
            </code>
          </usage>
        </example>
  
      </tag>
  
    </tagtoc>
  
  </taglib>
  
  <revision release="Pre Beta" date="07/09/2001">
    <description>
      Clean up of tag library prior to performing a beta
      release, moving toward an official release.
    </description>
    <section name="New Tags">
      <item>
        Added the <b>equalsAttribute</b> tag.
      </item>
    </section>
    <section name="Tag Changes">
      <item>
        Changed the name of the <b>isnew</b> tag to      
        <b>isNew</b>.      
      </item>
      <item>
        Changed the name of the <b>maxinactiveinterval</b> tag to
        <b>maxInactiveInterval</b>.
      </item> 
      <item>
        Changed the name of the <b>existsattribute</b> tag to
        <b>existsAttribute</b>.
      </item>
      <item>
        Changed the name of the <b>removeattribute</b> tag to
        <b>removeAttribute</b>.
      </item>
      <item>
        Changed the name of the <b>setattribute</b> tag to
        <b>setAttribute</b>.
      </item>
    </section>
  </revision>
         
  <revision release="Development" date="10/29/2000"> 
    <description>
      Initial version of tag library before Jakarta-Taglibs
      had an official release policy for tag libraries.
    </description>
  </revision>
  
  </document>
  
  
  

Mime
View raw message