JSP Upload parseRequest failure

8 views
Skip to first unread message

Ben

unread,
Jun 9, 2005, 4:45:13 PM6/9/05
to Java_Web...@googlegroups.com
I have created a Web Service and now need to add functionality. I have
created a client (JSP) to access the service and now need to use the
client to download files to the Web Service. I am using the Apache
FileUpload to do this. In the client I have code to parse the method
parameter and am getting a failure.


I'm trying to use the parseRequest()method on the request parameter in
my JSP file. First, I use the isMultipartContent() method on the
request parameter and it always returns a FALSE.


When I execute the parseRequest() method on the request parameter it
always causes an exception.


The method parameter in my JSP file is a type coyoterequestfacade, the
parseRequest() should except this because it is derived from
HttpServletResponse according to Apache. The data looks valid.


Can someone help me understand why this parseRequest() is not
functioning?


The following is the error message returned:


File upload exception:
org.apache.commons.fileupload.­FileUploadBase$InvalidContentT­ypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlenco­ded

Thanks,
Ben

Reply all
Reply to author
Forward
0 new messages