0

Am having a problem with my Jsp application while usind Oreilly's multipart classes.

The problem is that my app is running very well when I run it on some machines, but when I try running it on some servers for some reasons I dont understand, It throws this error : java.io.IOException: Corrupt form data: premature ending at com.oreilly.servlet.multipart.MultipartParser.(MultipartParser.java:205) at com.oreilly.servlet.multipart.MultipartParser.(MultipartParser.java:119) The above is just part of the logs am getting.

Someone tell me:- why is it that the app runs very well on some servers, while it gives me a problem when I try to run it from a different one?

What could be possible solutions to my problem?

Am running glassfish server3 on all servers.

kijana
  • 332
  • 2
  • 15

2 Answers2

1

The ancient Oreilly multipart parser has some bugs. See also this related question for an overview Corrupt form data: premature ending (Resolved). Rather use Apache Commons FileUpload or just the new Servlet 3.0 builtin request.getPart() method. See also How to upload files to server using JSP/Servlet?

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
1

I found the answer to my problem. It's the server version I was using The latest glassfish release has issues and that was such.. I installed Glassfish3 for linux and it worked perfectly well!

kijana
  • 332
  • 2
  • 15