This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes not enough session space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "not enough session space" Watch "not enough session space" New topic
Author

not enough session space

Mike Ev
Greenhorn

Joined: May 17, 2007
Posts: 11
Hiya..

I have a jsp page to upload some files..

The session is used to store a Map ( session.setAttribute("filemap", filemap ) ). This map contains all the files to be uploaded. I have a file-input type, onChange the file here is added to the map. The map is stored in the session and when the page is reloaded, all files in the map can be displayed. Then the user clicks upload, and all the files are uploaded somewhere by some other code.

This works perfectly on my local machine/local host -- on the server however, i've encountered this problem...
When I browse for a file to upload and select it (with the file-input) and the page reloads - files of small file-size will work fine. The page will re-load, the item will be added to the map and displayed on the page. When I select a file with a larger file-size (even 200KB), the page shows a 'page not found' error when it reloads. I'm guessing the session on the server cant hold much space!

Does anyone know how I can get around this? Any help is appreciated!

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60804
    
  65

There is no such thing as "session space". Your server is likely bumping up against a general out-o-memory constraint. Do you really feel that holding large files in memory is a scalable and sustainable design?
[ June 07, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mike Ev
Greenhorn

Joined: May 17, 2007
Posts: 11
its only a small internal program and will only be dealing with 'small' files. Any suggestions on an alternative way round this?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
the page shows a 'page not found' error when it reloads.


At this point most people would have gone to the log files to find out the exact cause rather than speculating about "session space."

Exactly how are you holding the file data? Does the server actually write a file? Where?

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: not enough session space
 
Similar Threads
Reading file attributes from local file system
Is there any way to do check how many files the user have uploaded?
File upload fails
uploading multiple files, 'post' not working off server (works fine off local host)
max size limit of file to be uploaded