[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9020
  • Last Modified:

get form data with method="post" and enctype="multipart/form-data"

1.) I need to use "method=post" because there is too much data to include in a URL for the get method
2.) Someone said that with "enctype=multipart/form-data" that JSP/servlets do not support the use of .getParameter() or that I need to "decode the request to get at the parameters and contents" of the form
3.) I would really like to use the com.oreilly.servlet package since I already got it to work and it is so simple.

Entry.txt
0
chandramohanraju
Asked:
chandramohanraju
  • 2
1 Solution
 
sunray_2003Commented:
You can use MultipartRequest class of com.oreilly.servlet package and call getParameter(java.lang.String name) method on it.
See http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html for reference.
0
 
ysnkyCommented:
Solutions:

Solution A:

1. download http://www.servlets.com/cos/index.html
2. invoke getParameters() on com.oreilly.servlet.MultipartRequest

Solution B:

1. download http://jakarta.apache.org/commons/sandbox/fileupload/
2. invoke readHeaders() in
org.apache.commons.fileupload.MultipartStream

Solution C:

1. download http://users.boone.net/wbrameld/multipartformdata/
2. invoke getParameter on
com.bigfoot.bugar.servlet.http.MultipartFormData

Solution D:

Use Struts. Struts 1.1 handles this automatically.




for more info;
http://www.jguru.com/faq/view.jsp?EID=1045507
0
 
sunray_2003Commented:
I think ysnky posted a detailed solution to this question. Can we know why this question is deleted. Has the asker found the solution by his own. Please advise.
0
 
Vee_ModCommented:
Force accepted.
Vee_Mod
Community Support Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now