Page 1 of 1

MemroyStore

Posted: Tue Jan 10, 2012 9:38 am
by Peter
Hello,

I would use the component using the MemoryStore. However, when I proceeded to upload, I can't get it back.

Here's the process I set up:
1 - I instantiate an object (upBean) of type "jfileupload.jspupload.FileUploadBean"
2 - I set various parameters such as upBean.setMemorystore()
3 - I launch the storage action => upBean.store (mrequest, "uploadfile")

However, when I want to retrieve the data uplaoded, upBean.getMemorystore() returns null.
I ventured to decompile the class jfileupload.jspupload.FileUploadBean.class and I noticed that the process of memory storage is based on the parameter "_ramFolder" which, I think, stays always to null value.

Could you enlighten me on this problem.

thank you,
Peter.

Re: MemroyStore

Posted: Sun Jan 15, 2012 2:42 pm
by support
Peter, do you have Premium license? If yes we can send source code of JSPUpload add-on.

Re: MemroyStore

Posted: Thu Jan 19, 2012 10:49 am
by Peter
Hi,

We haven't the Premium license but the Enterprise.

Can you tell me why the process (described in my previous post) returns null when I want to use the feature "MemoryStore"?
I don't find information on the use of the "MemoryStore".

Thanks,
Peter.

Re: MemroyStore

Posted: Wed Jan 25, 2012 7:47 am
by support
What is the scope of the FileUploadBean:
page?
<jsp:useBean id="upBean" scope="page" class="jfileupload.jspupload.FileUploadBean">

or session?
<jsp:useBean id="upBean" scope="session" class="jfileupload.jspupload.FileUploadBean">

To keep data in memory between HTTP requests it must be session or application. Session will generate a cookie that JFileUpload must catch and pass back in HTTP upload. To enable this behavior:
<PARAM NAME="param9" VALUE="cookiesource">
<PARAM NAME="value9" VALUE="jse">
See:
http://www.jfileupload.com/products/jfi ... ation.html

Then your JSP/Servlet engine will be able to provide the memory store you instantiated.

Does it help?