This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Data format problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Data format problem" Watch "Data format problem" New topic

Data format problem

Troy Wang

Joined: Jan 31, 2001
Posts: 6
I am trying to upload a file using servlet. If the servlet is only used for uploading a file, no problem. But if I put some textfields in the form and tried to retrive these data by (req.getParameter("xx"), then I got everything null in the corresponding fields. I guess it is because of the attribute: enctype="multipart/form-data" . Can anyone help me out? I don't want to use seperate forms. Many thanks.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Check ou tthis thread, it provides possible solutions.

So much trouble in the world -- Bob Marley
It is sorta covered in the JavaRanch Style Guide.
subject: Data format problem
Similar Threads
How to initiate a file download or push to client?
problem with enctype attribute in jsp
problem with multipart/form-data
html file with multiple form elements
how to get value from enctype