File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Unique identification of a client by web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Unique identification of a client by web application" Watch "Unique identification of a client by web application" New topic
Author

Unique identification of a client by web application

mirko calasso
Greenhorn

Joined: Feb 16, 2005
Posts: 6
Hi, i'm developping a web application that needs uniquely identify clients that connect to it. Since clients can have a dynamic IPs, i can't use IPs as identifier. I would like to avoid to use cookies. Can you suggest me other ways to identify clients? Thanks to everyone.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Do the clients need to be identified the same way from one visit to the next (across multiple sessions)? Or just through the course of one visit to the site (in one session)?

If just in one session, then use the jsessionid to uniquely identify them. If you don't want to use cookies make sure you properly encode all URLs with the id. See this tutorial.

If you want to identify the same client over multiple visits, require them to log in with a username and password. Then store some unique id in your database. The first time the user visits your site, you can generate thid using the Java class java.util.UUID or usually your DB can generate one as well. When the user successfully logs in you pull that ID out of the database and put it in the client's session.


Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unique identification of a client by web application