Environment entry taglib ver. 1.3


    Custom JSP tag. Lets you read environment entries (java:comp/env) from your deployment descriptor (web.xml).

For example:

Suppose you have the following definition in your web.xml file:
 


<env-entry>
<description>Welcome message</description>
<env-entry-name>hello</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>Welcome to Coldbeans site</env-entry-value>
</env-entry>

tag getEntry lets you read this value:
 


<%@ taglib uri="taglib.tld" prefix="env" %>

<env:getEntry name="hello"/>

Tags are:

getEntry

Body tag reads environment variable from web.xml file. Tag's body presents a default value (for String types). Parameters are:

1) name Describes a name for your entry
2) type Optional parameter. Describes an expected type for environment variable. Default value is java.lang.String.
3) id Optional parameter. Describes a page scope variable for data. Without this parameter tag just prints data.

for downloading:

Library: enventry.jar    Description: taglib.tld

© Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Also in Coldtags: