wood burning stoves*
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
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: 61206
    
  66

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: 61206
    
  66

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