{"id":420,"date":"2005-06-18T01:00:00","date_gmt":"2005-06-17T16:00:00","guid":{"rendered":"https:\/\/ecoop.net\/memo\/2005-06-18-1.html"},"modified":"2005-06-18T01:00:00","modified_gmt":"2005-06-17T16:00:00","slug":"2005-06-18-1","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/2005-06-18-1.html","title":{"rendered":"\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 &quot;multipart\/form-data&quot; \u51e6\u7406\u306e\u3068\u304d\u306b\u6b63\u3057\u304f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308b\u306b\u306f"},"content":{"rendered":"<p>\n&#8211; form \u30bf\u30b0\u3067 ENCTYPE=&#8221;multipart\/form-data&#8221; \u306b\u3059\u308b\u3068 ServletRequest.getParameter(Sting) \u7cfb\u3067\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u89e3\u91c8\u3067\u304d\u305a\u5168\u304f\u5024\u304c\u6e21\u3063\u3066\u6765\u306a\u304f\u306a\u308b\u305f\u3081\u3001Jakarta Commons FileUpload \u306e org.apache.commons.fileupload.DiskFileUpload.parseRequest(&#8230;) \u7b49\u3092\u4f7f\u3046\u3068\u3088\u3044\u3002\n<\/p>\n<blockquote><p>\/\/ \u9069\u5f53\u306b\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u306a\u306e\u3067\u30a8\u30e9\u30fc\u3042\u308b\u304b\u3082\u3002<br \/>\nDiskFileUpload o = new DiskFileUpload();<br \/>\no.setSizeMax(-1);<br \/>\no.setSizeThreshold(1024);<br \/>\no.setRepositoryPath(&#8220;\/tmp&#8221;);<br \/>\no.setHeaderEncoding(&#8220;Windows-31J&#8221;);<br \/>\nList list = o.parseRequest(request); \/\/ FileItem \u306e\u30ea\u30b9\u30c8<br \/>\nfor(Iterator it = list.iterator(); it.hasNext();){<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;FileItem param = (FileItem)it.next();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;if(!param.isFormField())<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;out.println(param.getFieldName() + &#8220;: &#8221; + param.getString());<br \/>\n}\n<\/p><\/blockquote>\n<p>&lt;<a href=\"http:\/\/www.jajakarta.org\/commons\/fileupload-1.0\/ja\/withoutPrimary\/org\/apache\/commons\/fileupload\/DiskFileUpload.html#parseRequest\">http:\/\/www.jajakarta.org\/commons\/fileupload-1.0\/ja\/withoutPrimary\/org\/apache\/commons\/fileupload\/DiskFileUpload.html#parseRequest<\/a>(javax.servlet.http.HttpServletRequest,%20int,%20long,%20java.lang.String)><br \/>\n&#8211; jajakarta.org: FileUpload API 1.0 (Ja)<br \/>\n&lt;<a href=\"http:\/\/jakarta.apache.org\/commons\/fileupload\/apidocs\/org\/apache\/commons\/fileupload\/DiskFileUpload.html\">http:\/\/jakarta.apache.org\/commons\/fileupload\/apidocs\/org\/apache\/commons\/fileupload\/DiskFileUpload.html<\/a>><br \/>\n&#8211; Jakarta \u516c\u5f0f: FileUpload API (current ver.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8211; form \u30bf\u30b0\u3067 ENCTYPE=&#8221;multipart\/form-data&#8221; \u306b\u3059\u308b\u3068 ServletRequest.getParameter(Sting) \u7cfb\u3067\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u89e3\u91c8 &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/2005-06-18-1.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 &quot;multipart\/form-data&quot; \u51e6\u7406\u306e\u3068\u304d\u306b\u6b63\u3057\u304f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308b\u306b\u306f<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[16],"class_list":["post-420","post","type-post","status-publish","format-standard","hentry","tag-j2ee"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=420"}],"version-history":[{"count":0,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/420\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}