ID servlet v. 1.1

Yes, this servlet simply returns unique ID. In JSON (or JSONP) format. You can use it in your Javascript application for getting unique ID from the server. How to use it:

1) download idPackage.jar and save it in WEB-INF/lib

2) describe ID servlet in web.xml file  


3) define a mapping:


and now you can use it. For JSON request call http://your_host/servlet/ID, for JSONP use a parameter callback that describes your Javascript function. In this example our callback function is myID:

function myID(v)
  alert("New ID:";

var cbscript = document.createElement("script");
cbscript.src = 'http://your_host/servlet/ID?callback=myID';
cbscript.type = 'text/javascript';

For downloading:

servlet: idPackage.jar  

 © Coldbeans    Comments?

See also JSOS - the largest collection of servlets and filters.

Also in Coldtags: