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:
For downloading:
servlet: idPackage.jar
See also JSOS - the largest collection of servlets and filters.
|
Also in Coldtags:
|