Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

error during uploading files - no parametres in request

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys.
I have a simple html page

with 2 text fields and 1 file field.
This is my simple servlet:
After sending request, this servlet shows, that it hasn't received any param. Answer page is
But if I use
/*ServletInputStream in = request.getInputStream();
int i =;
while (i!=-1) {
then i see all the HTTP request (in the answer page). I have also tried to get params using request.getParameter("..."), but the result was the same.
When i dont use tag enctype="multipart/form-data", all is ok (of course, no file was uploaded). Browser is mozilla.
Applications .war file is deployed using weblogic (because its a test of interface of greater application).
Can you help me with this problem, please?
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Max,

it's true: if you upload a file, you can't use request.getParameter(...) anymore.

I suggest you have a look at The Commons FileUpload package (see

Humans and their filthy friendship brings nothing but trouble. My only solace is this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic