File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Issue with MultipartFormDataRequest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Issue with MultipartFormDataRequest" Watch "Issue with MultipartFormDataRequest" New topic

Issue with MultipartFormDataRequest

rajarshi roy

Joined: Feb 14, 2010
Posts: 21

I am facing this problem while uploading an Excel sheet,using a jsp.

I am uploading the jsp with one extra parameter, choice between "Approve" and "Reject",using two radio buttons.So,the two Radio buttons and the file upload box ,all are present in the same form.On clicking submit,after selecting the file and radio button,the page gets submitted and the same page is refreshed with a flag==Y,that completes the rest of the operation.

But I am getting the following Exception while uploading the Excel sheet.

Exception: Posted content type isn't multipart/form-data

I am using javazoom.upload.MultipartFormDataRequest in javazoom package to upload the file.

I noticed that the constructor of the class MultipartFormDataRequest takes the request object as argument.

I have used the same thing before,but in two separate jsp file.First jsp having the file-upload box and no other parameters being passed.On submitting,it is redirected to the second jsp which processes the request.

The code used in the second page is like this:

It works fine in that case.But it does not work when I try to upload it using one jsp,along with some other parameters being passed.

Someone please help.I am stuck only due to this issue.
Have you tried LearnNowOnline?
subject: Issue with MultipartFormDataRequest