You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by webdev2 <vk...@yahoo.com> on 2008/07/11 05:58:58 UTC
fileUpload vs custom servlet
I upgraded my app to Struts2, which provides file uploading. Now my custom
servlet for uploading an attachment no longer receives the request. Is
there a configurable option for restoring the old functionality of having
the custom servlet upload the attachment? Thanks.
FYI - 1) Initially an exception was thrown as a result of
FilterDispatcher.doFilter handing off multipart handling. This was due to
a jar mismatch. So, I got the correct versions of the commons-io.jar and
commons-fileupload.jar, and the exception is gone. But my servlet never
receives the request. 2) I have a custom interceptor stack containing
defaultStack. That means the fileUpload interceptor is available.
--
View this message in context: http://www.nabble.com/fileUpload-vs-custom-servlet-tp18395960p18395960.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: fileUpload vs custom servlet
Posted by Laurie Harper <la...@holoweb.net>.
webdev2 wrote:
> I upgraded my app to Struts2, which provides file uploading. Now my custom
> servlet for uploading an attachment no longer receives the request. Is
> there a configurable option for restoring the old functionality of having
> the custom servlet upload the attachment? Thanks.
What old functionality? You don't mention what you upgraded *from*...
Struts 1? In any case, it sounds like the problem is probably a conflict
in you servlet/filter mappings in web.xml.
> FYI - 1) Initially an exception was thrown as a result of
> FilterDispatcher.doFilter handing off multipart handling. This was due to
> a jar mismatch. So, I got the correct versions of the commons-io.jar and
> commons-fileupload.jar, and the exception is gone. But my servlet never
> receives the request. 2) I have a custom interceptor stack containing
> defaultStack. That means the fileUpload interceptor is available.
The obvious question is, why use a custom servlet to handle uploads,
rather than let Struts deal with it for you? Does your servlet do some
special processing you can't easily migrate into an action?
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: fileUpload vs custom servlet
Posted by Joachim Rohde <ma...@joachimrohde.com>.
If you don't need the file-upload interceptor then remove it from your
interceptor stack or exclude it for those actions which rely on your
custom fileupload-servlet.
webdev2 schrieb:
> I upgraded my app to Struts2, which provides file uploading. Now my custom
> servlet for uploading an attachment no longer receives the request. Is
> there a configurable option for restoring the old functionality of having
> the custom servlet upload the attachment? Thanks.
>
> FYI - 1) Initially an exception was thrown as a result of
> FilterDispatcher.doFilter handing off multipart handling. This was due to
> a jar mismatch. So, I got the correct versions of the commons-io.jar and
> commons-fileupload.jar, and the exception is gone. But my servlet never
> receives the request. 2) I have a custom interceptor stack containing
> defaultStack. That means the fileUpload interceptor is available.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org