Can I restart a jsp session from a javascript?

Discussion in 'Java' started by mohammed.naghman@gmail.com, Oct 26, 2006.

  1. Guest

    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?
     
    , Oct 26, 2006
    #1
    1. Advertising

  2. Joe Attardi Guest

    On Oct 26, 4:02 pm, 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.
     
    Joe Attardi, Oct 26, 2006
    #2
    1. Advertising

  3. Guest

    Joe Attardi wrote:
    > On Oct 26, 4:02 pm, 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?
     
    , Oct 30, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Larry Yondespor

    JSP / Restart a session or create a new one

    Larry Yondespor, Feb 5, 2005, in forum: Java
    Replies:
    4
    Views:
    6,373
    Malte
    Feb 5, 2005
  2. Replies:
    0
    Views:
    4,507
  3. sridhar kumar ch
    Replies:
    1
    Views:
    8,756
  4. sridhar kumar ch
    Replies:
    0
    Views:
    827
    sridhar kumar ch
    Jun 28, 2006
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    311
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page