锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久综合五月,日韩一二三四区,中文字幕网站视频在线 http://www.aygfsteel.com/liangj/category/30378.htmlzh-cnWed, 26 Mar 2008 03:05:59 GMTWed, 26 Mar 2008 03:05:59 GMT60瑙e喅褰揊ORM鐨凟NCTYPE="multipart/form-data" 鏃秗equest.getParameter()鑾峰彇涓嶅埌鍊肩殑鏂規硶http://www.aygfsteel.com/liangj/archive/2008/03/26/188666.html姊佸仴姊佸仴Wed, 26 Mar 2008 02:38:00 GMThttp://www.aygfsteel.com/liangj/archive/2008/03/26/188666.htmlhttp://www.aygfsteel.com/liangj/comments/188666.htmlhttp://www.aygfsteel.com/liangj/archive/2008/03/26/188666.html#Feedback0http://www.aygfsteel.com/liangj/comments/commentRss/188666.htmlhttp://www.aygfsteel.com/liangj/services/trackbacks/188666.htmlSituation(鍘熷洜):
    javax.servlet.HttpServletRequest.getParameter(String) returns null when the ContentType is multipart/form-data

Solutions(瑙e喅鍔炴硶):
  • 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/fileupload/ 
    2. invoke readHeaders() in org.apache.commons.fileupload.MultipartStream
    Or
    1. Invoke parseRequest(request) on org.apache.commons.fileupload.FileUploadBase which returns list of org.apache.commons.fileupload.FileItem objects.
   2. Invoke isFormField() on each of the FileItem objects. This determines whether the file item is a form paramater or stream of uploaded file.
   3. Invoke getFieldName() to get parameter name and getString() to get parameter value on FileItem if it's a form parameter. Invoke write(java.io.File) on FileItem to save the uploaded file stream to a file if the FileItem is not a form parameter.

  • 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.


姊佸仴 2008-03-26 10:38 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 墨竹工卡县| 象山县| 张家港市| 广河县| 定安县| 济阳县| 南城县| 南乐县| 邢台县| 措美县| 土默特右旗| 门头沟区| 鄂托克前旗| 巴林左旗| 浦江县| 承德县| 东光县| 金沙县| 米脂县| 昭平县| 肇源县| 全南县| 本溪| 东源县| 安国市| 奉节县| 肇东市| 大关县| 磐石市| 广安市| 芷江| 含山县| 宜章县| 泾源县| 寿阳县| 启东市| 泰来县| 桓台县| 建阳市| 砀山县| 定兴县|