avi sinha
,
Ranch Hand
Nov 27, 2009 08:11:53
there are a lot of choices to do it . for example while forwarding use a parameter which can tell the servlet that the request is from the jsp.
based on the parameter you can create a counter.
avi sinha>
Shakeel Shaik
,
Greenhorn
Nov 27, 2009 09:02:45
You can try this approach
First write a listener that implements an HttpSessionListener
Implement the methods sessionCreated and sessionDestroyed, somewhat like this.
In jsp -> <% increment counter %>
In your servlet -> //check counter
hope this helps.
give it a try and let us know how it went.
Ravi Kiran Va
,
Ranch Hand
Nov 27, 2009 09:32:01
First of all . Thank all for you for help .
shaks ss what you said is a complex approach . I would prefer what sinha has mentioned .