Forums Register Login
unable to upload more than 5MB
HI ,

I need to upload product brochure file through ADMIN TOOL.
When i upload a file upto 4 MB it is working fine.
But when i upload more than 4.5 MB it is giving error in the page :--
Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
I tried to check the LOG FILES.It is not throwing any exception on the CONSOLE.
I checked the code.In the jsp it is calling a function to check the size of the file.The size limit is 500MB.So we can upload a file size upto 500MB.
But still it is not taking more than 5 MB.

Could any one help regarding the problem..............
It's quite strange. I can upload over 4GB. Actually I met a silly error when I tried to upload more 4GB due int limitation but switching to long fixed the problem.
Try to use encoding of multipart/form-data instead of application/x-www-form-urlencoded.

multipart/form-data should be used to upload files.

There is not a built-in library of J2ee to support multipart/form-data, but there are many on the net. Try this one: http://servlets.com/cos/
"Autumn Sky",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

JavaRanch Sheriff
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Become a Java guru with IntelliJ IDEA

This thread has been viewed 1147 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 20, 2019 13:08:30.