Thanks for the help, Joerg.

Now I integrate the file upload as a cocoon action with <map:act> in the sitemap pipeline.
Now I can handle the uploaded file.
Is this the prefered way, when I do not want to use flowscript?
I am not sure, because this way uses the apache avalon framework, which as far as I know, should be removed in cocoon 2.2.

Is there an other way to get a Part object in a servlet request?
I tried it with the non-cocoon-style servlet aproach, definied the servlet as bean definition in the block definition file (META-INF/ cocoon/spring).

public class UploadServlet extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {
...
}}


On Mar 10, 2008, at 1:11 PM, Joerg Heinicke wrote:

On 08.03.2008 13:14, Tobias Rübner wrote:

>> You must save them yourself during the request processing.
Here is a snippet of my servlet:

The problem is I don't know how you integrated it into Cocoon.

There is an API to access the files on a MultipartHttpServletRequest. In flowscript it should be possible by just doing cocoon.request.get("file") [1]. On Part [2] you have methods like copyToFile(..) or getInputStream().

[1] http://wiki.apache.org/cocoon/FileUploadsWithFlow
[2] 
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/servlet/multipart/Part.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to