• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

com.oreilly.servlet cannot upload big files

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, i'm using oreilly's multipart class for my file uploads.
it is working well on my pc.. but when i tried my upload module on our production site an "Unexpected end of part" exception appears when the size of the file im uploading exceeds 100KB...
pls help.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jason's multipart class has two different constructors, one that takes a size limit and one that doesn't. The default size limit is something like 100K or a Meg (I don't remember which). Is it possible you're using the constructor that doesn't take the size limit?
Otherwise, sounds like it might be a browser problem. Which browser version are you using?
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
christine lorraine
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks. it worked...
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear christine,
I am also trying to upload a file to server but i get null value from the html page when i try to retrive the file name using getParameterValues("ss"). Would you tell me how you have retrived the file name .
thanx
prabhakar.
 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why dont you try
objMultipartRequest.getFileNames();
 
varkala prabhakar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx deep,
getFileNames(); worked out,
But now when i use req.getParameter("string") before MultipartRequest i get the null values, and in my program, i need one parameter to be retrived before multipartRequest.
req u to plz help me
thanx
prabhakar.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can retrieve the parameter from the multipart request object. If you 'need' the parameter before the file itself, for example, the parameter shows where to upload the file to, what you should do is upload to a temporary directory and retrieve the file path later, and then use the File i/o classes to move that file. This is the recommended behaviour if you read the cos faq.
 
varkala prabhakar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear mike,
thanx for answering me and atlast i did the same thing and it worked out.
thanx
prabhakar.
 
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic