首页 > 编程 > JSP > 正文

解决jsp或serverlet 不能解析multipart/form-data 类型的表单域的问题

2019-11-17 04:09:20
字体:
来源:转载
供稿:网友
解决jsp或serverlet 不能解析multipart/form-data 类型的表单域的问题
10 6月 2008

Situation:

javax.servlet.HttpServletRequest.getParameter(String) returns null when the ContentType is multipart/form-data

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.

Solution E:
use jspSmartUpload compounds
http://ckasj.vicp.net/dokuwiki/doku.php/freespace:smart_upload 
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表