{"id":352,"date":"2021-02-18T22:06:10","date_gmt":"2021-02-18T13:06:10","guid":{"rendered":"https:\/\/www.opentone.co.jp\/optonlabos\/?p=352"},"modified":"2025-05-12T10:06:25","modified_gmt":"2025-05-12T01:06:25","slug":"j2ee%e3%82%a4%e3%83%b3%e3%82%b9%e3%82%bf%e3%83%b3%e3%82%b9%e5%a4%89%e6%95%b0%e3%81%ae%e6%b3%a8%e6%84%8f","status":"publish","type":"post","link":"https:\/\/www.opentone.co.jp\/ot-lab\/all\/uncategorized\/j2ee%e3%82%a4%e3%83%b3%e3%82%b9%e3%82%bf%e3%83%b3%e3%82%b9%e5%a4%89%e6%95%b0%e3%81%ae%e6%b3%a8%e6%84%8f","title":{"rendered":"J2EE\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\u306e\u6ce8\u610f"},"content":{"rendered":"\n<p>\u3053\u3093\u306b\u3061\u306f\u3002itou\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u7686\u3055\u3093\u306f\u3001J2EE\u3067Web\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3059\u308b\u306b\u5f53\u305f\u308a\u3001Servlet\u304c\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u30e2\u30c7\u30eb\u306a\u306e\u304b\u30b7\u30f3\u30b0\u30eb\u30b9\u30ec\u30c3\u30c9\u30e2\u30c7\u30eb\u306a\u306e\u304b\u3068\u3044\u3046\u306e\u3092\u610f\u8b58\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n\n\n\n<p>\u4eca\u56de\u3001\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u30e2\u30c7\u30eb\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u306e\u3067\u516c\u958b\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u79c1\u306f\u3001J2EE\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30c1\u30a7\u30c3\u30af\u30c4\u30fc\u30eb\u3092\u304b\u3051<br>\u6307\u6458\u306e\u7b87\u6240\u306b\u3064\u3044\u3066\u3001\u4fee\u6b63\u3092\u884c\u3046\u3068\u3044\u3046\u6848\u4ef6\u306b\u643a\u308f\u308a\u307e\u3057\u305f\u3002<br>\u305d\u3053\u3067\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\u306e\u5ba3\u8a00\u306b\u3064\u3044\u3066\u6307\u6458\u3092\u53d7\u3051\u307e\u3057\u305f\u3002<br>\u4e0b\u8a18\u306e\u3001\u3069\u3053\u304c\u554f\u984c\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n\n\n\n<p>public class Sample extends HttpServlet {<\/p>\n\n\n\n<p>private String entriedNumber = &#8220;&#8221;;<\/p>\n\n\n\n<p>\/\/POST\u3055\u308c\u305f<br>protected void doPost (HttpServletRequest req,HttpServletResponse res) {<\/p>\n\n\n\n<p>\/\/\u2460\u30d1\u30e9\u30e1\u30fc\u30bf\u3088\u308a\u767b\u9332\u756a\u53f7\u3092\u53d6\u5f97<br>entriedNumber = req.getParameter(&#8220;entriedNumber&#8221;);<br>(\u7701\u7565)<br>\/\/\u2461\u767b\u9332\u756a\u53f7\u3092\u6a19\u6e96\u51fa\u529b\u306b\u51fa\u529b<br>System.out.println(entriedNumber);<br>}<br>}<\/p>\n\n\n\n<p>\u6307\u6458\u306e\u5185\u5bb9\u3068\u3057\u3066\u306f\u3001\u300cprivate String entriedNumber = &#8220;&#8221;;\u300d\u304c\u8907\u6570\u306e\u30b9\u30ec\u30c3\u30c9\u3067\u5171\u6709\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u554f\u984c\u3060\u3068\u3044\u3046\u6307\u6458\u3067\u3057\u305f\u3002<br>\u8907\u6570\u30b9\u30ec\u30c3\u30c9\u3067\u3001\u51e6\u7406\u306e\u8ffd\u3044\u8d8a\u3057\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u4e0d\u6b63\u306b\u4e0a\u66f8\u304d\u3055\u308c\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u306e\u3067\u3059\u3002<br>\u305f\u3081\u3057\u306b\u3001\u2460\u2461\u306e\u9593\u306b\u3001\u30b9\u30ec\u30c3\u30c9\u306e\u8ffd\u3044\u8d8a\u3057\u3092\u767a\u751f\u3055\u305b\u307e\u3057\u305f\u3002<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br>\u30b9\u30ec\u30c3\u30c9\uff11:\u2460\u3067\u767b\u9332\u756a\u53f7100\u3092\u53d6\u5f97\u3057\u3001entriedNumber\u306b\u8a2d\u5b9a(100)<br>\u30b9\u30ec\u30c3\u30c9\uff12:\u2461\u3067\u767b\u9332\u756a\u53f7200\u3092\u53d6\u5f97\u3057\u3001entriedNumber\u306b\u8a2d\u5b9a(200)<br>\u30b9\u30ec\u30c3\u30c9\uff12:entriedNumber(200)\u304c\u6a19\u6e96\u51fa\u529b\u306b\u51fa\u529b<br>\u30b9\u30ec\u30c3\u30c9\uff11:entriedNumber(200)\u304c\u6a19\u6e96\u51fa\u529b\u306b\u51fa\u529b<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<p>\u30b9\u30ec\u30c3\u30c9\uff11\u3067\u8a2d\u5b9a\u3057\u305f\u767b\u9332\u756a\u53f7\u304c\u3001\u30b9\u30ec\u30c3\u30c92\u306b\u3088\u308a\u4e0a\u66f8\u304d\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<br>Servlet\u306f\u3001\u6307\u5b9a\u3057\u306a\u3044\u9650\u308a\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3067\u52d5\u4f5c\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u3001\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5834\u5408\u3001\u3069\u3046\u3059\u3079\u304d\u3067\u3042\u3063\u305f\u304b\u3002<br>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306f\u3001\u30b9\u30ec\u30c3\u30c9\u5358\u4f4d\u3067\u5024\u304c\u4fdd\u6301\u3055\u308c\u308b\u306e\u3067\u3001\u554f\u984c\u306b\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>public class Sample extends HttpServlet {<\/p>\n\n\n\n<p>\/\/POST\u3055\u308c\u305f<br>protected void doPost (HttpServletRequest req,HttpServletResponse res) {<\/p>\n\n\n\n<p>String entriedNumber = &#8220;&#8221;;<\/p>\n\n\n\n<p>\/\/\u2460\u30d1\u30e9\u30e1\u30fc\u30bf\u3088\u308a\u767b\u9332\u756a\u53f7\u3092\u53d6\u5f97<br>entriedNumber = req.getParameter(&#8220;entriedNumber&#8221;);<br>(\u7701\u7565)<br>\/\/\u2461\u767b\u9332\u756a\u53f7\u3092\u6a19\u6e96\u51fa\u529b\u306b\u51fa\u529b<br>System.out.println(entriedNumber);<br>}<br>}<\/p>\n\n\n\n<p>\u3053\u3046\u3044\u3063\u305f\u5185\u5bb9\u306f\u3001\u666e\u6bb5\u306f\u3042\u307e\u308a\u610f\u8b58\u3057\u306a\u304f\u3066\u3082\u3001\u300c\u901a\u5e38\u306f\u3001\u6b63\u5e38\u306b\u52d5\u3044\u3066\u3057\u307e\u3046\u300d\u3082\u306e\u306a\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br>Servlet\u958b\u767a\u8005\u304c\u6b63\u3057\u3044\u77e5\u8b58\u3092\u3082\u3064\u3001\u3042\u308b\u3044\u306f\u3001\u81ea\u52d5\u30b3\u30fc\u30c9\u30c1\u30a7\u30c3\u30af\u3067\u691c\u51fa\u3059\u308b\u306a\u3069\u3092\u3057\u3066\u3044\u304f\u5fc5\u8981\u304c\u3042\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<div class=\"opent-_2\" style=\"margin-top: 10px;margin-right: 10px;margin-bottom: 10px;margin-left: 10px;\" id=\"opent-3960328475\"><a href=\"https:\/\/www.opentone.co.jp\/backlog\/\" aria-label=\"twitter_backlogskt_new\"><img src=\"https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new.jpg\" alt=\"\"  srcset=\"https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new.jpg 1024w, https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new-300x157.jpg 300w, https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new-768x401.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" width=\"384\" height=\"200\"   \/><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002itou\u3067\u3059\u3002 \u7686\u3055\u3093\u306f\u3001J2EE\u3067Web\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3059\u308b\u306b\u5f53\u305f\u308a\u3001Servlet\u304c\u30de\u30eb<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[8],"class_list":["post-352","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-blog",""],"acf":[],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"engage-mag-carousel-img":false,"engage-mag-carousel-img-landscape":false,"engage-mag-carousel-large-img":false,"engage-mag-carousel-large-img-landscape":false,"engage-mag-large-thumb":false,"engage-mag-small-thumb":false},"uagb_author_info":{"display_name":"ah106rx4o4","author_link":"https:\/\/www.opentone.co.jp\/ot-lab\/author\/ah106rx4o4"},"uagb_comment_info":0,"uagb_excerpt":"\u3053\u3093\u306b\u3061\u306f\u3002itou\u3067\u3059\u3002 \u7686\u3055\u3093\u306f\u3001J2EE\u3067Web\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3059\u308b\u306b\u5f53\u305f\u308a\u3001Servlet\u304c\u30de\u30eb","_links":{"self":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/comments?post=352"}],"version-history":[{"count":1,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/352\/revisions"}],"predecessor-version":[{"id":353,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/352\/revisions\/353"}],"wp:attachment":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/media?parent=352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/categories?post=352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/tags?post=352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}