File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes To recognise the Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "To recognise the Client" Watch "To recognise the Client" New topic

To recognise the Client

Doshi Milan
Ranch Hand

Joined: May 29, 2001
Posts: 112
Hllo Friends,
I was asked in an interview as to how will the Web Server recognises, i.e distinguishes between the n number of clients it is entertaining. i.e in other words, the sesions are maintained but when the client say C1 again comes back how will the server know that it is C1 and not C2 or C3 ..etc.
Thanks in advance,
Milan Doshi
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Through the Session objects.

Which are implemented one of two ways...

The server sets a cookie containing the session id and that cookie gets sent with each subsequent request, enabling the server to track who is who.

or if cookies are disabled, the server can use URL rewriting (it writes the session id into the URL), and this way can also keep track of who is who.
I agree. Here's the link:
subject: To recognise the Client
jQuery in Action, 3rd edition