struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: fileUpload vs custom servlet
Date Fri, 11 Jul 2008 20:46:05 GMT
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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message