Morgan Delagrange 1.0 1.1 application http://jakarta.apache.org/taglibs/application-1.0 Application Tag library (Beta 1)

The APPLICATION custom tag library contains tags which can be used to access all the information about the ApplicationContext for a JSP application.

Tags are provided to access information in "application" scoped attributes.

/WEB-INF/application.tld app

This custom tag library requires no software other than a servlet container that supports the JavaServer Applications Specification, version 1.2.

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 <jsp:getProperty ... /> tag:

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.

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 here.

attribute org.apache.taglibs.application.AttributeTag empty attribute Get the value of a single application attribute. Get the value of a single application attribute. 1.0 None name yes no Name of application attribute to get. 1.0 Output the value of the application attribute with name "test1" ]]> attributes org.apache.taglibs.application.AttributesTag org.apache.taglibs.application.AttributesTEI JSP attributes Loop through all application attributes. Loop through all application attributes. 1.0 None id org.apache.taglibs.application.AttributesTag true NESTED Application Attribute Bean 1.0 name Yes No Application attribute name. 1.0 value Yes No Application attribute value. 1.0 id yes no Script variable id for use with standard jsp:getProperty tag. 1.0 Output the name and value of all the application attributes Name: Value: ]]> equalsAttribute org.apache.taglibs.application.EqualsAttributeTag JSP equalsAttribute Includes the body of the tag if the application attribute value equals the match attribute. See if a application attribute equals some value. 1.0 None name yes no Name of application attribute. 1.0 value no no If value is set to false the equalsAttribute tag includes body of tag if application attribute does not equal the match attribute. Default is true. 1.0 match yes no String to test for equality with application attribute value. 1.0 ignoreCase no no Set to true to test for equality while ignoring the case of the letters. Set to false to test for case sensitive equality. Default is false 1.0 Determine if the application attribute "test1" value equals "blah" The application attribute with name test1 matches the string "blah". The application attribute with name test1 does not match the string "blah". ]]> existsAttribute org.apache.taglibs.application.ExistsAttributeTag JSP existsAttribute Includes the body of the tag if the application attribute exists. See if a application attribute exists. 1.0 None name yes no Name of application attribute. 1.0 value no no If value is set to false the existsAttribute tag includes body of tag if application attribute does not exist. Default is true. 1.0 Determine if the "test1" Application attribute exists The application attribute with name test1 exists. The application attribute with name test1 does not exist. ]]> removeAttribute org.apache.taglibs.application.RemoveAttributeTag empty removeAttribute Removes an attribute from a application. Removes an attribute from a application. 1.0 None name yes no Name of application attribute to remove. 1.0 Remove the application attribute with name "test1" ]]> setAttribute org.apache.taglibs.application.SetAttributeTag JSP setAttribute Sets the value of the application attribute to the content of the tag body. Sets the value of a application attribute. 1.0 None name yes no Name of application attribute to set value for. 1.0 Set the application attribute with name "test1" Test Value ]]> initParameter org.apache.taglibs.application.InitParameterTag empty initParameter Get the value of a single application initialization parameter. Get the value of a single application initialization parameter. 1.0 None name yes no Name of application initialization parameter to get. 1.0 Output the value of the application initialization parameter with name "test1" ]]> initParameters org.apache.taglibs.application.InitParametersTag org.apache.taglibs.application.InitParametersTEI JSP initParameters Loop through all application initialization parameters, or get the value of a single initialization parameter. Loop through all application initialization parameters. 1.0 None id org.apache.taglibs.application.InitParametersTag true NESTED Application Initialization Parameter Bean 1.0 name Yes No Application initialization parameter name. 1.0 value Yes No Application initialization parameter value as a string. 1.0 id yes no Script variable id for use with standard jsp:getProperty tag. 1.0 name no no Name of a single initialization parameter to get the value of. 1.0 Output the name and value of all the application initialization parameters Name: Value: ]]> Output the name and value of the test1 application initialization parameter Name: Value: ]]> equalsInitParameter org.apache.taglibs.application.EqualsInitParameterTag JSP equalsInitParameter Includes the body of the tag if the application initialization parameter value equals the match attribute. See if a application initialization parameter equals some value. 1.0 None name yes no Name of application initialization parameter. 1.0 value no no If value is set to false the equalsInitParameter tag includes body of tag if application initParameter does not equal the match attribute. Default is true. 1.0 match yes no String to test for equality with application initialization parameter value. 1.0 ignoreCase no no Set to true to test for equality while ignoring the case of the letters. Set to false to test for case sensitive equality. Default is false 1.0 Determine if the application initialization parameter "test1" value equals "blah" The initialization parameter with name test1 matches "blah". The initialization parameter with name test1 does not match "blah". ]]> existsInitParameter org.apache.taglibs.application.ExistsInitParameterTag JSP existsInitParameter Includes the body of the tag if the application initialization parameter exists. See if an application initialization parameter exists. 1.0 None name yes no Name of application initialization parameter. 1.0 value no no If value is set to false the existsInitParameter tag includes body of tag if application initParameter does not exist. Default is true. 1.0 Determine if the "test1" application initialization parameter exists The initializaion parameter with name test1 exists. The initialization parameter with name test1 does not exist. ]]>
First Beta Release Clean up of tag library prior to performing a beta release, moving toward an official release.
Changed the name of the existsattribute tag to existsAttribute. Changed the name of the removeattribute tag to removeAttribute. Changed the name of the setattribute tag to setAttribute. Changed the name of the equalsattribute tag to equalsAttribute. Change the name of the equalsAttribute tag ignorecase attribute to ignoreCase. Changed the name of the initparameter tag to initParameter. Changed the name of the initparameters tag to initParameters. Changed the name of the existsinitparameter tag to existsInitParameter. Changed the name of the equalsinitparameter tag to equalsInitParameter. Change the name of the initParameters tag Initialization Parameter Bean parameter property to value. Change the name of the attributes tag Application Attribute Bean attribute property to value.
Initial version of tag library before Jakarta-Taglibs had an official release policy for tag libraries.