A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
how can i identify whether it is fitst request or second request and so on
Joined: Aug 06, 2008
Aug 27, 2008 01:35:00
init() method will be called by two ways
one is during server start up if we specify <load-on-startup> in web.xml
and second is during the first request right?
if iam right, can you tell me how can i identify that whether it is first request or second request and so on.
Thanks & Regards
Joined: Apr 02, 2005
Aug 27, 2008 05:57:00
You can store the value in an attribute in
object and in each of the service method , extract this value and increment it and again
store in same attribute .
Joined: Dec 11, 2004
Aug 27, 2008 06:38:00
You question is a little unclear to me.
Are you asking how to tell if a request from a user is his/her first or second or are you asking how to tell whether a servelet was brought into service as a result of a load-on-startup directive or as a result of the first hit to it?
How to ask a question...
Simple Servlet Examples
I agree. Here's the link:
subject: how can i identify whether it is fitst request or second request and so on
WebServices - How it is working
how to handle session in EJB
Difference between WML and XHTML
General Query on HTTP request generation
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015