You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Jens Viebig <js...@gmx.de> on 2002/04/15 13:32:55 UTC

ClassCastException while uploading Files (struts 1.1b) [PATCH]

See the Posting from Yannic Lamothe in struts-user:
--------------->>
Hi,

I'm using the latest nightly build from struts (1.1) and I'm
experiencing some issues with file upload.
The validation of the form performs well, but when the forward is called
to display the next page, I've got the following exception.

java.lang.ClassCastException:
org.apache.struts.upload.MultipartRequestWrapper
            at
org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatch
erImpl.java:172)
...
<<---------------------
I got the same Error with the struts-upload example using struts 1.1b.
Thanks to Yannick for sending me a fix for that Problem. We like to share
that fix with the community (See attachement).
It seems to be a bug in the new RequestProcessor Class. It does not unwrap
the Request from the MultipartRequestWrapper.

Greetings
Jens Viebig