Why are you loading the files from the DB before the user asks for them (clicks the download link)?
Why are you saving the byte arrays in the page instance? If you really must load them from the DB before the user clicks the download link, save them to a temp file and save only the path of the file in the page (like Igor originally said). -- Jeremy Thomerson http://www.wickettraining.com On Mon, Oct 19, 2009 at 2:40 PM, fachhoch <[email protected]> wrote: > > I have several pages which has links to uploaded files to download, I > load > this from database and save it inside page instance as instance variable . > When user clicks on the download link I retrieve the byte array from the > page instance and call download. Several user have different instances > of same pages and all these pages have these huge files byte[] . > Sure this will cause Outof memory issues. > To resolve this I have to use temp folder , > every time a page instance gets created I have to create temp folder > to > save these uploaded files bytes with a proper name so that I can know this > folder is for this user and this page and this instance. I am asking do > I > have to create a naming factory which names the folder for every page > instance ? or is there anything available which I can use a as a folder > name? > > > > fachhoch wrote: > > > > I show these files in almost all my pages.So every page before it loads > > has to create all these files in temp folder , please suggest me what > > should be the identifier to recognize these files ,I actually have > these > > files inside PancelCachingTab , and this tab gets loaded only when user > > clicks on on it for the first time. > > > > > > > > igor.vaynberg wrote: > >> > >> store them in a temp directory and only give your page the filename. > >> > >> -igor > >> > >> On Mon, Oct 19, 2009 at 10:55 AM, tubin gen <[email protected]> wrote: > >>> I have some huge files upto 50Mb in side my page instance , I have > >>> to > >>> save them in page instance and I cannot reload it everytime from > >>> database > >>> becasue other users might delete the file . > >>> > >>> I am getting java.lang.OutOfMemoryError , only way I can resolve > this > >>> is > >>> increasing heap size but Is this a bad idea storing files upto 50Mb > >>> inside > >>> page instance ? > >>> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/uploaded-files-in-page-instance-tp25962716p25964309.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
