• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

unable to upload more than 5MB  RSS feed

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..............
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/
 
Author and ninkuma
Marshal
Posts: 66806
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.

Thanks!
bear
JavaRanch Sheriff
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!