Just ran into the exception again:

java.lang.IllegalStateException: ServletRequest does not contain
multipart content
        at
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.<init
>(MultipartServletWebRequest.java:90)
        at
com.evite.event.web.create.MainImageUpload.receiveUpload(MainImageUpload
.java:66)
        at
com.evite.event.web.create.MainImageUpload.<init>(MainImageUpload.java:3
8)


Sorry, I meant to say 'request'....

MainImageUpload is what the file uploader points to.

Michael

-----Original Message-----
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2008 11:34 AM
To: [email protected]
Subject: Re: Multipart form throws exception

response not being multipart? wasnt aware there was such a thing...

-igor

On Wed, Jun 25, 2008 at 11:24 AM, Michael Mehrle
<[EMAIL PROTECTED]> wrote:
> I'm on Wicket 1.3.3 and am experiencing problems with multipart
content
> on Safari and IE. The backend page receiving the image processes it
just
> fine and returns a response like this:
>
>
>
> RequestCycle.get().setRequestTarget(new IRequestTarget() {
>
>                                    public void detach(RequestCycle
> requestCycle) {
>
>            }
>
>                                    public void respond(RequestCycle
> requestCycle) {
>
>                                                // formulate the JSON
> response
>
>                                                StringBuffer response =
> new StringBuffer("{\n");
>
>                if (StringUtils.isNotEmpty(error)) {
>
>                        response.append("\"error\":
> \"").append(getString(error)).append("\"");
>
>                } else {
>
>                        response.append("\"msg\":
>
\"").append(getString("successfulFileUploadNotification")).append("\",\n
> ");
>
>                        response.append("\"photoId\":
> \"").append(photo.getId()).append("\",\n");
>
>                        response.append("\"uri\":
> \"").append(photoService.getPhotoSrc(photo)).append("\"");
>
>                }
>
>                response.append("\n}");
>
>                                                Response rep =
> requestCycle.getResponse();
>
>
> rep.setContentType("text/javascript");
>
>                        rep.write(response);
>
>            }
>
>                        });
>
>
>
> As you can see I'm bouncing a JSON response back, which is received
and
> handled on my front end. It works in Firefox but fails in Safari and
IE
> with an error message which I would love to post but I'm not getting
> every time. I do remember however that it complained about the
response
> not being 'multipart'.
>
>
>
> There is a similar bug report that was posted a while ago and claimed
> this to be fixed in 1.3.3.
>
>
>
>
http://www.nabble.com/Multipart-form-with-nested-ajaxform-throws-excepti
> on-in-1.3.1-td15975693.html
>
>
>
> Any suggestions would be welcome.
>
>
>
> Thanks!
>
>
>
> Michael
>
>

---------------------------------------------------------------------
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