Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Servlets and the fly likes file upload problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "file upload problem" Watch "file upload problem" New topic

file upload problem

Javed Sardar
Ranch Hand

Joined: Sep 10, 2002
Posts: 33
The following is the HTML code I am using to upload a file

IN my servlet when I try to get request.getContentType, it is returning null.
Could anybody please suggest when am I going wrong.
Thanks and Regards,
Arun Prasad Namasivayam

Joined: Jan 02, 2003
Posts: 5
You need to change the <form> attribute "encoding" to "enctype" thatz the only error i can see in the HTML.
keep smiling
M.K.A. Monster
Ranch Hand

Joined: May 02, 2002
Posts: 130
I've been using the oreilli classes, and when you look at these code there's something else interesting:
I agree. Here's the link:
subject: file upload problem