Client ID taglib ver. 1.2


    Custom JSP tags library lets you create JavaScript code for setting an unique client ID. This code saves ID in HTML5 local storage, so it could be used in the subsequent calls. Tag creates a Javascript code that checks unique ID within the local storage, creates it in case of absence and makes available via JavaScript function getClientId().

So for your JavaScript application you will get a function - getClientId(), that returns an unique ID for this user (for this user-agent). You can post this code back to the server if you need. E.g. in your mobile web applications this library lets you assign and reuse unique ID for the each client. For example:
 


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

<script type="text/javascript">
<j:ClientId />

alert(getClientId());

</script>

Tags are:

ClientId

Body tag lets you create (add to the page) JavaScript code for setting an unique client ID. Attributes are:

1) script Optional attribute. Describes a boolean value. If this value is true tag will wrap the output with a <script> tag. Default value is false.

ResetId

Body tag lets you create JavaScript code for removing client ID. Attributes are:

1) script Optional attribute. Describes a boolean value. If this value is true tag will wrap the output with a <script> tag. Default value is false.

2) cond Optional attribute. Describes a boolean value tag's behavior depends on. Default value is true (remove ID).

for downloading:

Library: clientidtag.jar    Description: taglib.tld
 © Coldbeans      Comments?

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

Also in Coldtags: