Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Can I restart a jsp session from a javascript?

Reply
Thread Tools

Can I restart a jsp session from a javascript?

 
 
mohammed.naghman@gmail.com
Guest
Posts: n/a
 
      10-26-2006
Hi,

I have a jsp page with the maxInactivity timeout set to 120 seconds.


I also have a javascript that shows a warning to the user when one more

minute is left for the session to expire.


I want to give the user an option to renew his session.


How can I do this?

 
Reply With Quote
 
 
 
 
Joe Attardi
Guest
Posts: n/a
 
      10-26-2006
On Oct 26, 4:02 pm, (E-Mail Removed) wrote:
> I have a jsp page with the maxInactivity timeout set to 120 seconds.
> I also have a javascript that shows a warning to the user when one more
> minute is left for the session to expire.
> I want to give the user an option to renew his session.
> How can I do this?


You can write some JavaScript code to send the browser to a servlet or
action that renews the session (or something as simple as refreshing
the page), with a confirm dialog of some kind.

 
Reply With Quote
 
 
 
 
mohammed.naghman@gmail.com
Guest
Posts: n/a
 
      10-30-2006

Joe Attardi wrote:
> On Oct 26, 4:02 pm, (E-Mail Removed) wrote:
> > I have a jsp page with the maxInactivity timeout set to 120 seconds.
> > I also have a javascript that shows a warning to the user when one more
> > minute is left for the session to expire.
> > I want to give the user an option to renew his session.
> > How can I do this?

>
> You can write some JavaScript code to send the browser to a servlet or
> action that renews the session (or something as simple as refreshing
> the page), with a confirm dialog of some kind.


I tried refreshing the page and it works. But the problem is, the page
that I am trying to refresh is a form so for the scenario where the
user has filled half the form and then goes idle and the session times
out, then on refreshing the entered values will be cleared.

I just want to give the user to renew the session. Can I do it without
refreshing?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Pass session parameters from one jsp to another jsp sridhar kumar ch Java 1 06-28-2006 05:28 PM
[JSP] difference between jsp:forward and jsp:include alexjaquet@gmail.com Java 0 06-02-2006 01:21 PM
Restart Now - Restart Later another MickG Computer Support 14 04-24-2006 02:55 AM
XP restart vs msconfig restart Opsimath Computer Support 4 07-31-2005 02:58 PM
JSP / Restart a session or create a new one Larry Yondespor Java 4 02-05-2005 08:48 AM



Advertisments