Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

J2EE Session Expires with Large File Upload

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All

This is in regards to a issue related with large File Upload and J2EE Session

Issue -

When a large file is uploaded from a web application and that transfer rate exceeds the session timeout, the user is back to login page.

Required Testcase -

The session should not expire when file is getting uploaded

Analysis -

There are multiple options to address this situation, however nothing seems to fit appropriately. I cannot increase session timeout as it will affect overall application, there is a security risk if session is set to max (setMaxInactiveInterval as -1).

I am thinking in line on implementing something at listner level (but looks like the HTTPSessionListner will come late as handler) or something to keep the session alive using META-REFRESH

I am looking if someone has dealt with this scenario before and how that's implemented (if there is any other better solution that could address this quite obvious scenario)

Really appreciate feedback
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't you have a progress indicator? If so, that should be enough (your meta-refresh thing, or via Ajax). If not, it's a bad/puzzling user experience, so I'd sure recommend it.
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a progress indicator will be the ideal solution for you.
As it will be communicating with the server while the upload is in progress that will keep your session alive. It will also prove better user experience.
 
Sandy Fiasher
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately, No - I don't have the Progress Bar - Looking into that option now - Thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic