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 JSP and the fly likes about multipart/form-data 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 » JSP
Bookmark "about multipart/form-data" Watch "about multipart/form-data" New topic
Author

about multipart/form-data

Johnson Abraham
Greenhorn

Joined: May 31, 2004
Posts: 19
I am using JSP technology.when i am putting the enctype of the HTML form as MULTIPART/FORM-DATA i am not able to get the values of the other parameters via request.getParameter()I mean the request object is almost lost. can onyone tell me possible reasons and solution of how to get those values.

[ June 01, 2004: Message edited by: Johnson Abraham ]
[ June 01, 2004: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Automatic parsing of the request only happens when the request enctype is "url-encoded" (I forget the exact syntax, but it's the default of the form tag). With a multipart form, you need to parse the request yourself (or use a thrid party library to do so for you).

Search this, the Servlet, and perhaps the Tomcat forum for previous discussions on this topic.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Found it. The default enctype is "application/x-www-form-urlencoded".
Johnson Abraham
Greenhorn

Joined: May 31, 2004
Posts: 19
Thanks for the suggestion i went through a API on www.orielly.com n accomplished the task.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about multipart/form-data
 
Similar Threads
uploading and storing image in JSP/Mysql
Problem with JSP form
Problem with JSP form
How do I get request parameters when the form is encoded?
commons.fileupload