ID tag ver. 1.4

    Custom JSP tag. Tag ID calculates an unique id. You can use this tag in two forms:

1) just prints a calculated unique id
 


<%@ taglib uri="taglib.tld" prefix="get" %>
<html>
<p><i> unique ID is:</i> <get:ID />
</html>

2) prints nothing, but creates a variable (page scope, type is java.lang.String) initialized by the calculated ID. You can use this variable later in your scriptlets:
 


<%@ taglib uri="taglib.tld" prefix="get" %>
<html>
<get:ID id="var_name"/>
<br>ID is  <%=var_name%>
<%
    String sId=var_name;
    ....
%>
</html>

Here parameter id describes a name for your page scope variable. E.g. in the above mentioned example this name is var_name.

By default tag calculates a numerical id. You can change this behavior by setting the parameter alpha.

Tags are:

ID

Calculates an unique ID. Parameters are:

1) id Optional parameter. Describes a name for your page scope variable. Without this parameter tag just prints data.
2) alpha Optional parameter. Possible values are true or false. If this value is false than tag calculates a numerical id. Default value is false.
 

for downloading:

 Library: idtag.jar     Description: taglib.tld

 © Coldbeans      Comments?

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