During FileUpload Session Expires

Discussion in 'Java' started by Nick, Apr 6, 2006.

  1. Nick

    Nick Guest

    Hi,

    I have a web application which use struts. I have used commons file
    upload to allow the user to upload files using my web site.

    The problem is when he uploads a file of large size say 20 MB the file
    is uploaded successfully but the session expires.

    Now I do not want to touch the session timeouts configured for the
    application but during the file uploads I want the session not to
    timeout or expire.

    How can I do it in my Action Servlet ?

    Any ideas ?

    Thanks
    Nick
     
    Nick, Apr 6, 2006
    #1
    1. Advertising

  2. Nick wrote:
    > Hi,
    >
    > I have a web application which use struts. I have used commons file
    > upload to allow the user to upload files using my web site.
    >
    > The problem is when he uploads a file of large size say 20 MB the file
    > is uploaded successfully but the session expires.
    >
    > Now I do not want to touch the session timeouts configured for the
    > application but during the file uploads I want the session not to
    > timeout or expire.


    it's not clear what you mean when you say you don't want to touch the
    timeouts configured the for the application. Do you mean you don't want
    to change the configuration? Or you don't want to change it
    programmatically either? A solution might be to call
    setInactiveInterval(-1) before you start the upload, and then call
    setInactiveInterval again to reset the timeout to the configured value.
    Another option is to make a copy of all your session information, upload
    the file, and then check if a new session has been created. If it is,
    you put back your copied session information.
     
    Andrea Desole, Apr 6, 2006
    #2
    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. Rahul Kansara

    session expires quickly

    Rahul Kansara, Nov 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,034
    alex bowers
    Nov 11, 2003
  2. Welman Jordan
    Replies:
    3
    Views:
    552
    Welman Jordan
    Feb 28, 2004
  3. Shimon Sim
    Replies:
    2
    Views:
    450
    Steven Cheng[MSFT]
    Apr 22, 2004
  4. Daniel Geisenhoff

    Session never expires

    Daniel Geisenhoff, Sep 7, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    2,961
    Eliyahu Goldin
    Sep 7, 2004
  5. TJS
    Replies:
    2
    Views:
    344
Loading...

Share This Page