{"id":989,"date":"2018-04-15T12:52:44","date_gmt":"2018-04-15T03:52:44","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=989"},"modified":"2023-04-27T21:42:39","modified_gmt":"2023-04-27T12:42:39","slug":"%e3%80%90jsp%e3%80%81%e3%82%b5%e3%83%bc%e3%83%96%e3%83%ac%e3%83%83%e3%83%88%e3%80%91%e6%96%87%e5%ad%97%e5%8c%96%e3%81%91%e3%82%92%e9%98%b2%e3%81%90%e3%81%ab%e3%81%af%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=989","title":{"rendered":"\u3010JSP\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3011\u6587\u5b57\u5316\u3051\u3092\u9632\u3050\u306b\u306f\uff1f"},"content":{"rendered":"<p>\u666e\u901a\u306b\u5b9f\u88c5\u3057\u3066\u3044\u308b\u3068\u69d8\u3005\u306a\u8981\u56e0\u3067\u6587\u5b57\u5316\u3051\u307e\u3059\u304c\u3001\u305d\u308c\u3092\u9632\u3050\u969b\u306b\u3001JSP\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3067\u306f\u69d8\u3005\u306a\u8a18\u8ff0\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u753b\u9762\u306b\u8868\u793a\u3059\u308b\u969b\u306e\u6587\u5b57\u5316\u3051\u3092\u9632\u3050<\/h2>\n<h3>\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30a4\u30d7<\/h3>\n<p>Tomcat\u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3068\u3057\u3066<span style=\"color: #ff0000;\"><strong>\u300cISO-8859-1\u300d\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u65e5\u672c\u8a9e\u306f\u6587\u5b57\u5316\u3051\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3067\u3001\u65e5\u672c\u8a9e\u3092\u753b\u9762\u306b\u51fa\u529b\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u6307\u5b9a\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h4>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3067\u6307\u5b9a\u3059\u308b\u5834\u5408<\/h4>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\nresponse.setContentType(&quot;text\/html; charset=UTF-8&quot;);\r\n\r\n<\/pre>\n<h4>JSP\u3067\u6307\u5b9a\u3059\u308b\u5834\u5408<\/h4>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;%@page contentType=&quot;text\/html; charset=UTF-8&quot; %&gt;\r\n\r\n<\/pre>\n<h4>MIME\u30bf\u30a4\u30d7<\/h4>\n<p>\u30c6\u30ad\u30b9\u30c8\u3084\u3001HTML\u3001\u753b\u50cf\u7b49\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u3084\u308a\u53d6\u308a\u3055\u308c\u308b\u30c7\u30fc\u30bf\u306e\u7a2e\u985e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e00\u822c\u7684\u306a\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u300c<strong>text\/html<\/strong>\u300d\u3092\u6307\u5b9a\u3059\u308b\u306e\u304c\u307b\u3068\u3093\u3069\u3067\u3057\u3087\u3046\u3002<\/p>\n<h4>\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0<\/h4>\n<p>\u660e\u793a\u7684\u306b\u51fa\u529b\u3059\u308b\u6587\u5b57\u30b3\u30fc\u30c9\u306e\u7a2e\u985e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4e0a\u306e\u4f8b\u3067\u306f\u3001\u300cUTF-8\u300d\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u753b\u9762\u3067\u5165\u529b\u3057\u305f\u6587\u5b57\u304c\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3067\u6587\u5b57\u5316\u3051\u308b\u306e\u3092\u9632\u3050<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u203b\u672c\u8a2d\u5b9a\u3067\u3001\u5f71\u97ff\u304c\u3042\u308b\u306e\u306fGET\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u5834\u5408\u306e\u307f\u306b\u306a\u308a\u307e\u3059\u3002POST\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u5f71\u97ff\u3057\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<p>POST\u3068GET\u306e\u9055\u3044\u306f\u4e0b\u8a18\u306e\u8a18\u4e8b\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"LY4NsZaVi7\"><p><a href=\"http:\/\/www.code-magagine.com\/?p=560\">\u3010Java\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3011doGet\u3001doPost\u306e\u4f7f\u3044\u5206\u3051<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"http:\/\/www.code-magagine.com\/?p=560&#038;embed=true#?secret=LY4NsZaVi7\" data-secret=\"LY4NsZaVi7\" width=\"500\" height=\"282\" title=\"&#8220;\u3010Java\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3011doGet\u3001doPost\u306e\u4f7f\u3044\u5206\u3051&#8221; &#8212; \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30de\u30ac\u30b8\u30f3\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>JSP\u3067\u3001\u6587\u5b57\u5316\u3051\u3092\u9632\u3050\u306b\u306f\u3001\u300c<strong>page\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6<\/strong>\u300d\u306b\u3088\u308a\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3059\u308b\u3068\u89e3\u8aac\u3055\u305b\u3066\u9802\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><strong>\u753b\u9762\u3067\u5165\u529b\u3057\u305f\u30c7\u30fc\u30bf\u306f\u3001URL\u3067\u6e21\u3059\u305f\u3081\u306b\u3001URL\u30a8\u30f3\u30b3\u30fc\u30c9\u304c\u884c\u308f\u308c\u307e\u3059\u3002<\/strong>\uff08\u300cpage\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u300d\u3067\u6307\u5b9a\u3057\u305f\u6587\u5b57\u30b3\u30fc\u30c9\u306b\u3088\u3063\u3066\u30a8\u30f3\u30b3\u30fc\u30c9\u304c\u306a\u3055\u308c\u307e\u3059\u3002\uff09<\/p>\n<p>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3067\u3001\u76f4\u63a5URL\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u305f\u5165\u529b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u3001getParameter\u30e1\u30bd\u30c3\u30c9\u7b49\u3067\u3001\u305d\u306e\u307e\u307e\u53d6\u308a\u51fa\u3059\u3068<strong>\u6587\u5b57\u5316\u3051<\/strong>\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001\u540c\u3058\u304fTomcat\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3067\u3042\u308b<span style=\"color: #ff0000;\"><strong>\u300cISO-8859-1\u300d\u3067\u81ea\u52d5\u3067\u5165\u529b\u30d1\u30e9\u30e1\u30fc\u30bf\u304b\u3089\u3001\u5024\u3092\u53d6\u308a\u51fa\u305d\u3046\u3068\u3059\u308b\u305f\u3081\u3067\u3059\u3002<\/strong><\/span><\/p>\n<p>\u306a\u306e\u3067\u3001URL\u3067\u5165\u529b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u5834\u5408\u306f\u3001request\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3057\u3066\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3067\u4e0b\u8a18\u306e\u69cb\u6587\u3092\u4f7f\u3063\u3066\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u3042\u3052\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n\r\nrequest.setCharacterEncoding(&quot;UTF-8&quot;);\r\n\r\n<\/pre>\n<p><strong><span style=\"color: #ff0000;\">\u203b\u5fc5\u305a\u3001getParameter\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u524d\u306b\u3001\u4e0a\u8a18\u306e\u5ba3\u8a00\u3092\u884c\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\uff01<\/span><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"\u666e\u901a\u306b\u5b9f\u88c5\u3057\u3066\u3044\u308b\u3068\u69d8\u3005\u306a\u8981\u56e0\u3067\u6587\u5b57\u5316\u3051\u307e\u3059\u304c\u3001\u305d\u308c\u3092\u9632\u3050\u969b\u306b\u3001JSP\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3067\u306f\u69d8\u3005\u306a\u8a18\u8ff0\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002 \u753b\u9762\u306b\u8868\u793a\u3059\u308b\u969b\u306e\u6587\u5b57\u5316\u3051\u3092\u9632\u3050 \u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30a4\u30d7 Tomcat\u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3068\u3057\u3066\u300cI [&hellip;]","protected":false},"author":1,"featured_media":1095,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/989"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=989"}],"version-history":[{"count":9,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/989\/revisions"}],"predecessor-version":[{"id":1113,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/989\/revisions\/1113"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/1095"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=989"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}