web app, how to reset session time

J

John_Woo

Hi,

Using awt/swing, it's very easy to catch all mouse/keyboard event;

I'm wondering, in servlet/jsp web app, how to catch those events?

That's what I think, by that I can reset the session-time - the spec of
a project required whenever user's mouse/keyboard moves/hits, reset the
session time to 3 mins.

Any idea?
 
O

Oliver Wong

John_Woo said:
Hi,

Using awt/swing, it's very easy to catch all mouse/keyboard event;

I'm wondering, in servlet/jsp web app, how to catch those events?

That's what I think, by that I can reset the session-time - the spec of
a project required whenever user's mouse/keyboard moves/hits, reset the
session time to 3 mins.

Any idea?

Sounds like very poorly designed requirements.

You might be able to use JavaScript to detect keypresses and mouse
movements, and then submit a ping to the server which would reset the
session time.

- Oliver
 
J

John_Woo

Oliver said:
Sounds like very poorly designed requirements.

You might be able to use JavaScript to detect keypresses and mouse
movements, and then submit a ping to the server which would reset the
session time.

- Oliver

Hi Oliver,

Can u tell why the requirements is not smart? I guessed the <reset
session> may prevent not being able to submit b/o session out. How to
submit a ping in this case but remain same session?
 
O

Oliver Wong

John_Woo said:
Hi Oliver,

Can u tell why the requirements is not smart?

It is using the design of a traditional application and applying it to a
web application. Web applications should not be designed in terms of mouse
or keyboard events; they should be designed in terms of HTTP requests.
I guessed the <reset
session> may prevent not being able to submit b/o session out. How to
submit a ping in this case but remain same session?

As part of the ping, you send whatever information is nescessary to
identify the session you're persisting. This may be a cookie, or a special
GET URL, for example.

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top