Hello Nils-H.
Customizing multipartRequestProcessor seems really hard.
I modified RequestUtils instead. I commented out the usage of multipartHandler in method populate. Now all my multipart/form-data requests are treated as non-multipart/form-data and I am able to upload files without using struts build in upload lib. I'm able to use the jakarta file upload lib because the input stream is no longer parsed.


Is there a way to reference my version of RequestUtils from the struts-config file? The struts-config dtd documentation only specifies changes to multipartClass. Can any class in the struts framework be overridden from the Controller Configuration element?
John

--------------------------------------------------
From: "Nils-Helge Garli Hegvik" <nil...@gmail.com>
Sent: Thursday, February 26, 2009 11:15 AM
To: "Struts Users Mailing List" <user@struts.apache.org>
Subject: Re: how do you bypass struts file upload functionality?

I think you can customize file uploading by using the "multipartClass"
in the controller configuration [1].

Nils-H

[1] - http://struts.apache.org/1.3.10/userGuide/configuration.html#controller_config

On Thu, Feb 26, 2009 at 7:23 PM, John Dell'Aera <della...@hotmail.com> wrote:
Hello Dave.

Thanks for your response. I'm using Struts 1 at the moment.
Soon enough I will try Struts 2. But for now I want to finish learning
Struts 1.

How do you "intercept" the file upload mechanism in Struts 1?
Do I have to modify the source to ignore multipart/form-data encoded
requests?

John

PS. I'm considering using a FileUploadServlet just for the file upload
request.


--------------------------------------------------
From: "Dave Newton" <newton.d...@yahoo.com>
Sent: Thursday, February 26, 2009 1:49 AM
To: "Struts Users Mailing List" <user@struts.apache.org>
Subject: Re: how do you bypass struts file upload functionality?

John Dell'Aera wrote:

I have a file upload application that I'm porting to struts from my
custom framework.
I would like to continue using the jakarta file upload api so that I do
not have to modify
my file uploader class. Is there a way to bypass the struts file upload
functionality?

Should just be able to take out the "fileUpload" interceptor from your
interceptor stack, if you're dead-set on doing it manually.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to