You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by gl...@apache.org on 2001/07/14 16:18:01 UTC

cvs commit: jakarta-taglibs/application/xml application.xml

glenn       01/07/14 07:18:01

  Added:       application/xml application.xml
  Log:
  Convert to new build
  
  Revision  Changes    Path
  1.1                  jakarta-taglibs/application/xml/application.xml
  
  Index: application.xml
  ===================================================================
  <?xml version="1.0" ?>
  
  <!-- Change all instances of application with the jakarta-taglib 
       name for this tag library.
  
       Change all instances of Application 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="./application.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: Application JSP Tag Library</title>
         -->
    <!-- The name here is used in the HTML <meta name="author"...> tag -->
    <author>Morgan Delagrange</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>application</short-name>
    <!-- URI of taglib -->
    <uri>http://jakarta.apache.org/taglibs/application-1.0</uri>
    <!-- The name to use in titles, etc. for the taglib -->
    <display-name>Application Tag library (Pre Beta)</display-name>
  
    <description>
      <P>The PAGE custom tag library contains tags which can be used to
        access all the information about the ApplicationContext for a JSP application.</P>
      <P>Tags are provided to access information in "application" scoped attributes.</P>
    </description> 
  
    <!-- The taglib-location is used to fill in the web.xml configuration
         information in the HTML doc. -->
    <taglib-location>/WEB-INF/application.tld</taglib-location>
  
    <!-- The prefix is used to fill in the taglib directive
         configuration information in the HTML doc. -->
    <prefix>app</prefix>
  
    <!-- This element must be straight text and is copied right into
         the "Requirements" section of the HTML doc. -->
    <requirements-info>
      <P>This custom tag library requires no software other than a servlet
        container that supports the JavaServer Applications Specification, version 1.2.
      </P>  
  
      <P>The tag library also works in some JSP version 1.1 servlet containers,
        such as Tomcat, but not in others, such as Weblogic.  The tags in this
        tag library are designed according to the JSP 1.2 specification, which
        makes this requirement of the &lt;jsp:getProperty ... /&gt; tag:</P>
  
      <DL><DD>
        The value of the name attribute in jsp:setProperty and jsp:getProperty
        will refer to an object that is obtained from the applicationContext object
        through its findAttribute() method.
      </DD></DL>
  
      <P>The JSP 1.1 specification does not require this behaviour, and while
        Tomcat happens to support it, Weblogic does not.  Note that it is
        fairly straightforward to write a custom tag that emulates this
        behaviour for Weblogic users.  Sample source code for such a tag can be
        found <a href="GetPropertyTag.java">here</a>.</P>
    </requirements-info>
  
    <tagtoc name="Application Attribute Tags">
  
      <tag>
        <name>attribute</name>
        <tag-class>org.apache.taglibs.application.AttributeTag</tag-class>
        <body-content>empty</body-content>
        <display-name>attribute</display-name>
  
        <description>
          Get the value of a single application attribute.
        </description>
  
        <summary>Get the value of a single application attribute.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of application attribute to get.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Output the value of the application attribute with name "test1"
            </comment>
            <code>
  <![CDATA[
  <app:attribute name="test1"/>
  ]]>
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>attributes</name>
        <tag-class>org.apache.taglibs.application.AttributesTag</tag-class>
        <tei-class>org.apache.taglibs.application.AttributesTEI</tei-class>
        <body-content>JSP</body-content>
        <display-name>attributes</display-name>
  
        <description>
          Loop through all application attributes.
        </description>
  
        <summary>Loop through all application attributes.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
        <variable>
          <name-from-attribute>id</name-from-attribute>
          <variable-class>org.apache.taglibs.application.AttributesTag</variable-class>
          <declare>true</declare>
          <scope>NESTED</scope>
          <description>Application Attribute Bean</description>
          <availability>1.0</availability>
  
          <beanprop>
            <name>name</name>
            <get>Yes</get>
            <set>No</set>
            <description>
              Application attribute name.
            </description>
            <availability>1.0</availability>
          </beanprop>
          <beanprop>
            <name>value</name>
            <get>Yes</get>
            <set>No</set>
            <description>
              Application 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 application attributes
            </comment>
            <code>
  <![CDATA[
  <app:attributes id="loop">
  Name: <jsp:getProperty name="loop" property="name"/>
  Value: <jsp:getProperty name="loop" property="value"/>
  </app:attributes>
  ]]>    
            </code>
          </usage>
        </example>
         
      </tag>
  
      <tag>
        <name>equalsAttribute</name>
        <tag-class>org.apache.taglibs.application.EqualsAttributeTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>equalsAttribute</display-name>
   
        <description>
          Includes the body of the tag if the application attribute value equals
          the <b>match</b> attribute.
        </description>
   
        <summary>
          See if a application 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 application attribute.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>value</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            If value is set to <b>false</b> the equalsAttribute tag includes body
            of tag if application attribute does not equal the <b>match</b> attribute.
            Default is <b>true</b>.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>match</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            String to test for equality with application 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 application attribute "test1" value equals "blah"
            </comment>
            <code>
  <![CDATA[
  <app:equalsAttribute name="test1" match="blah">
    The application attribute with name test1 matches the string "blah".
  </app:equalsAttribute>
  <app:equalsAttribute name="test1" match="blah" value="false">
    The application attribute with name test1 does not match the string "blah".
  </app:equalsAttribute>
  ]]>
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>existsAttribute</name>
        <tag-class>org.apache.taglibs.application.ExistsAttributeTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>existsAttribute</display-name>
    
        <description>
          Includes the body of the tag if the application attribute exists.
        </description>
    
        <summary>
          See if a application attribute exists.
        </summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
    
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of application attribute.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <attribute>
          <name>value</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            If value is set to <b>false</b> the existsAttribute tag includes body
            of tag if application attribute does not exist. Default is <b>true</b>.
          </description>
          <availability>1.0</availability>
        </attribute>
              
        <example>
          <usage>
            <comment>
              Determine if the "test1" Application attribute exists
            </comment>
            <code>
  <![CDATA[
  <app:existsAttribute name="test1">
   The application attribute with name test1 exists.
  </app:existsAttribute>
  <app:existsAttribute name="test1" value="false">
   The application attribute with name test1 does not exist.
  </app:existsAttribute>
  ]]>         
            </code>
          </usage>
        </example>
           
      </tag>
  
      <tag>
        <name>removeAttribute</name>
        <tag-class>org.apache.taglibs.application.RemoveAttributeTag</tag-class>
        <body-content>empty</body-content>    
        <display-name>removeAttribute</display-name>
  
        <description>
          Removes an attribute from a application.
        </description>
    
        <summary>Removes an attribute from a application.</summary>
        <availability>1.0</availability> 
        <restrictions>None</restrictions>
    
        <attribute>
          <name>name</name> 
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of application attribute to remove.
          </description>
          <availability>1.0</availability>
        </attribute>
        
        <example>
          <usage> 
            <comment>
              Remove the application attribute with name "test1"
            </comment>
            <code>   
  <![CDATA[
  <app:removeAttribute name="test1"/>
  ]]>
            </code>
          </usage>
        </example>
                 
      </tag>
  
      <tag>
        <name>setAttribute</name>
        <tag-class>org.apache.taglibs.application.SetAttributeTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>setAttribute</display-name>
  
        <description>
          Sets the value of the application attribute to the content of the tag body.
        </description>
   
        <summary>Sets the value of a application attribute.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
    
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of application attribute to set value for.
          </description> 
          <availability>1.0</availability>
        </attribute>
      
        <example>
          <usage>
            <comment>
              Set the application attribute with name "test1"
            </comment> 
            <code>   
  <![CDATA[
  <app:setAttribute name="test1">Test Value</app:setAttribute>
  ]]> 
            </code>
          </usage>
        </example>
  
      </tag>
  
    </tagtoc>
  
    <tagtoc name="Application Initialization Parameter Tags">
   
      <tag>
        <name>initParameter</name>
        <tag-class>org.apache.taglibs.application.InitParameterTag</tag-class>
        <body-content>empty</body-content>
        <display-name>initParameter</display-name>
   
        <description>
          Get the value of a single application initialization parameter.
        </description>
  
        <summary>
          Get the value of a single application initialization parameter.
        </summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of application initialization parameter to get.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Output the value of the application initialization parameter
              with name "test1"
            </comment>
            <code>
  <![CDATA[
  <req:initParameter name="test1"/>
  ]]>
            </code>
          </usage>
        </example>
  
      </tag>
  
      <tag>
        <name>initParameters</name>
        <tag-class>org.apache.taglibs.application.InitParametersTag</tag-class>
        <tei-class>org.apache.taglibs.application.InitParametersTEI</tei-class>
        <body-content>JSP</body-content>
        <display-name>initParameters</display-name>
  
        <description>
          Loop through all application initialization parameters, or get the
          value of a single initialization parameter.
        </description>
  
        <summary>Loop through all application initialization parameters.</summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
  
        <variable>
          <name-from-attribute>id</name-from-attribute>
          <variable-class>org.apache.taglibs.application.InitParametersTag</variable-class>
          <declare>true</declare>
          <scope>NESTED</scope>
          <description>Application Initialization Parameter Bean</description>
          <availability>1.0</availability>
    
          <beanprop>
            <name>name</name>
            <get>Yes</get>
            <set>No</set>
            <description>
              Application initialization parameter name.
            </description>
            <availability>1.0</availability>
          </beanprop>
          <beanprop>
            <name>value</name>
            <get>Yes</get>
            <set>No</set>
            <description>
              Application initialization parameter value as a string.
            </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>
          
        <attribute>
          <name>name</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of a single initialization parameter to get the value of.
          </description>
          <availability>1.0</availability>
        </attribute>
  
        <example>
          <usage>
            <comment>
              Output the name and value of all the application initialization
              parameters
            </comment>
            <code>
  <![CDATA[
  <req:initParameters id="loop">
  Name: <jsp:getProperty name="loop" property="name"/>
  Value: <jsp:getProperty name="loop" property="value"/>
  </req:initParameters>
  ]]>     
            </code>
          </usage>
          <usage>
            <comment>
              Output the name and value of the test1 application initialization
              parameter
            </comment>
            <code>
  <![CDATA[
  <req:initParameters id="single" name="test1">
  Name: <jsp:getProperty name="single" property="name"/>
  Value: <jsp:getProperty name="single" property="value"/>
  </req:initParameters>
  ]]>     
            </code>
          </usage>
        </example>
      
      </tag>
  
      <tag>
        <name>equalsInitParameter</name>
        <tag-class>org.apache.taglibs.application.EqualsInitParameterTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>equalsInitParameter</display-name>
          
        <description>
          Includes the body of the tag if the application initialization
          parameter value equals the <b>match</b> attribute.
        </description>
          
        <summary>
          See if a application initialization parameter equals some value.
        </summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
          
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of application initialization parameter.
          </description>
          <availability>1.0</availability>
        </attribute>
         
        <attribute>
          <name>value</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            If value is set to <b>false</b> the equalsInitParameter tag includes
            body of tag if application initParameter does not equal the
            <b>match</b> attribute.  Default is <b>true</b>.
          </description>
          <availability>1.0</availability>
        </attribute>
         
        <attribute>
          <name>match</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            String to test for equality with application initialization
            parameter 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 application initialization parameter "test1"
              value equals "blah"
            </comment>
            <code>
  <![CDATA[
  <req:equalsInitParameter name="test1" match="blah">
    The initialization parameter with name test1 matches "blah".
  </req:equalsInitParameter>
  <req:equalsInitParameter name="test1" match="blah" value="false">
    The initialization parameter with name test1 does not match "blah".
  </req:equalsInitParameter>
  ]]>     
            </code>
          </usage>
        </example>
          
      </tag>
  
      <tag>
        <name>existsInitParameter</name>
        <tag-class>org.apache.taglibs.application.ExistsInitParameterTag</tag-class>
        <body-content>JSP</body-content>
        <display-name>existsInitParameter</display-name>
          
        <description>
          Includes the body of the tag if the application initialization
          parameter exists.
        </description>
          
        <summary>
          See if an application initialization parameter exists.
        </summary>
        <availability>1.0</availability>
        <restrictions>None</restrictions>
          
        <attribute>
          <name>name</name>
          <required>yes</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            Name of application initialization parameter.
          </description>
          <availability>1.0</availability>
        </attribute>
          
        <attribute>
          <name>value</name>
          <required>no</required>
          <rtexprvalue>no</rtexprvalue>
          <description>
            If value is set to <b>false</b> the existsInitParameter tag includes
            body of tag if application initParameter does not exist.
            Default is <b>true</b>.
          </description>
          <availability>1.0</availability>
        </attribute>
          
        <example>
          <usage>
            <comment>
              Determine if the "test1" application initialization parameter exists
            </comment>
            <code>
  <![CDATA[
  <req:existsInitParameter name="test1">
   The initializaion parameter with name test1 exists.
  </req:existsInitParameter>
  <req:existsInitParameter name="test1" value="false">
   The initialization parameter with name test1 does not exist.
  </req:existsInitParameter>
  ]]>     
            </code>
          </usage>
        </example>
      </tag>
  
    </tagtoc>
  
  </taglib>
  
  <revision release="Pre Beta" date="07/14/2001">
    <description>
      Clean up of tag library prior to performing a beta
      release, moving toward an official release.
    </description>
    <section name="Tag Changes">
      <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>
      <item>
        Changed the name of the <b>equalsattribute</b> tag to
        <b>equalsAttribute</b>.
      </item>
      <item>
        Change the name of the <b>equalsAttribute</b> tag <b>ignorecase</b>
        attribute to <b>ignoreCase</b>.
      </item>
      <item>
        Changed the name of the <b>initparameter</b> tag to
        <b>initParameter</b>.
      </item>
      <item>
        Changed the name of the <b>initparameters</b> tag to      
        <b>initParameters</b>.          
      </item>
      <item>
        Changed the name of the <b>existsinitparameter</b> tag to
        <b>existsInitParameter</b>.
      </item>
      <item>
        Changed the name of the <b>equalsinitparameter</b> tag to
        <b>equalsInitParameter</b>.
      </item>
      <item>
        Change the name of the <b>initParameters</b> tag Initialization
        Parameter Bean <b>parameter</b> property to <b>value</b>.
      </item>
      <item> 
        Change the name of the <b>attributes</b> tag Application
        Attribute Bean <b>attribute</b> property to <b>value</b>.
      </item>
    </section>
  </revision>
         
  <revision release="Development" date="12/25/2000"> 
    <description>
      Initial version of tag library before Jakarta-Taglibs
      had an official release policy for tag libraries.
    </description>
  </revision>
  
  </document>