This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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
It's not a secret anymore!