This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Distinguish first time from second time call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

Distinguish first time from second time call

sudheshna Iyer
Ranch Hand

Joined: Aug 20, 2004
Posts: 71
How do I know whether a particular request is a first time request or second
time request. I need to implement some logic only for the second time request.

Also I want to know how many times a request has come from the same user. I
need to ask the user to login after certain number of usages to the site.

Your help is greately appreciated.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Duplicate Of:

sudheshna aaa,

Posting the same question in multiple forums is called cross-posting and is considered to be very rude.
It wastes the time of the people who would try to help you.
I've answered your question in the JSP forum.
[ May 01, 2005: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Distinguish first time from second time call
Similar Threads
authentication and sessions
Distinguish first time from second time call
always print old session
how database handle request?
Multiple request due to double click