-
1. Re: Partial steps to get file upload running, final step doe
davidsan1001 Oct 25, 2005 2:38 PM (in response to davidsan1001)One more step... enable mulitpart filter. Add this to your web.xml
<filter-name>multipartFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<filter-mapping>
<filter-name>multipartFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -
2. Re: Partial steps to get file upload running, final step doe
davidsan1001 Oct 25, 2005 2:45 PM (in response to davidsan1001)Stuck here though. "fileupload.jsp" loads fine. Selecting file works fine. Give it a name and hitting the button "load it up" works without any errors, however that file is supposed to show up on the page but doesn't.
Also, if you hit either of the other two links called "Download Image" I get this error message.
----------------------------------------------------------
HTTP Status 404 - /jbpm/fileupload_showimg.jsf
type Status report
message /jbpm/fileupload_showimg.jsf
description The requested resource (/jbpm/fileupload_showimg.jsf) is not available.
--------------------------------------------------------------------
I realize this might be more of a Myfaces issues so I will move over to that group to get help.
Anyone do this? Anyone know what might be causing this? -
3. Re: Partial steps to get file upload running, final step doe
davidsan1001 Oct 25, 2005 3:20 PM (in response to davidsan1001)Works! (Not sure where on the filesystem its going yet but, who cares right now!)
I had to edit the file "fileupload.jsp" and replace
fileupload_showimg.jsf ... with
fileupload_showimg.jsp
Also, I had to copy the fileupload_showimg.jsp into the jbpm.3/src/resources/java.webapp directory..same place as the fileupload.jsp. -
4. Re: Partial steps to get file upload running, final step doe
koen.aers Oct 25, 2005 6:17 PM (in response to davidsan1001)This is interesting. Couldn't we use something like this to deploy *.par archive files? The deploy *.par screen would essentially upload the file to the deployment servlet...
Or did I miss something and was this already the purpose of your trials? ;-)
Regards,
Koen -
5. Re: Partial steps to get file upload running, final step doe
davidsan1001 Oct 25, 2005 6:45 PM (in response to davidsan1001)If your question was to me, I'm just interested in uploading a file from a task. Hoping to eventually solve the following use cases.
1) Workflow centers around a document, one person starts the workflow uploads a document, next actor on the next task can download the file, make changes, upload. etc etc throughout the workflow.
2) Uploaded file is excel spreadsheet. User uploads properly formatted excel sheet (perhaps as xml) this is parsed into a form that can be put into the database.
3) Info in the database can be queried and placed into a file then the file is formatted in such a way that the user can open in excel. Lots business folks love their excel and can play with graphs etc.
Dave -
6. Re: Partial steps to get file upload running, final step doe
davidsan1001 Oct 25, 2005 6:46 PM (in response to davidsan1001)So my next step I think is to create a Backing Bean that can take the file and either save it to the file system or into the database.
Any help?
Dave -
7. Re: Partial steps to get file upload running, final step doe
kukeltje Oct 25, 2005 7:20 PM (in response to davidsan1001)Or into a jsr-170 compliant repository. Would be even nicer!!
And Koen... Yes, it can be used to deploy par files. -
8. Re: Partial steps to get file upload running, final step doe
davidsan1001 Oct 25, 2005 9:16 PM (in response to davidsan1001)I'm going there.
..So I found a test case ByteArrayDBTest.java. That has some clues, especially a line
ByteArray byteArray = new ByteArray(bytes);
jbpmSession.getSession().save(byteArray);
seems simple enough to save the file once I get it in a byte array. Now I just have to make the byte array a variable value, give that variable a string name.
..more for tomorrow. Lets see, I have to create a backing bean to capture the graphic file then write some code to convert the graphic file to a byte array, save the byte array as a variable value and name. -
9. Re: Partial steps to get file upload running, final step doe
kukeltje Oct 26, 2005 3:02 AM (in response to davidsan1001)David,
I would NOT put the file in the jBPM Database. It is not designed for that. Put it in an external DB and just store the referece in thejBPM DB. -
10. Re: Partial steps to get file upload running, final step doe
davidsan1001 Oct 26, 2005 3:38 PM (in response to davidsan1001)Thanks Ronald. I thought of that after I posted. I found some code for placing the file in the file system. I'll work that out and post again.
Dave -
11. Re: Partial steps to get file upload running, final step doe
hade79 Feb 17, 2007 5:35 PM (in response to davidsan1001)Hi,
I have the same problem. I stored a file into the file system of the server. But how do I get the file from the server. I tried to get it by using a link with file.getAbsolutePath() but that doesn't work.
Dennis