{"id":926,"date":"2018-04-14T23:37:57","date_gmt":"2018-04-14T14:37:57","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=926"},"modified":"2023-05-27T20:48:18","modified_gmt":"2023-05-27T11:48:18","slug":"%e3%80%90tomcat%e3%80%81%e3%82%b5%e3%83%bc%e3%83%96%e3%83%ac%e3%83%83%e3%83%88%e9%96%8b%e7%99%ba%e3%80%91web-xml%e3%81%ae%e6%9b%b8%e3%81%8d%e6%96%b9","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=926","title":{"rendered":"\u3010Tomcat\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u958b\u767a\u3011web.xml\u306e\u66f8\u304d\u65b9"},"content":{"rendered":"<h2>\u5177\u4f53\u4f8b<\/h2>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;web-app xmlns=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee&quot; xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd&quot; version=&quot;2.5&quot;&gt;\r\n\r\n   \t&lt;servlet&gt;\r\n\t\t&lt;servlet-name&gt;hello&lt;\/servlet-name&gt;\r\n\t\t&lt;servlet-class&gt;HelloServlet&lt;\/servlet-class&gt;\r\n\t&lt;\/servlet&gt;\r\n  \t&lt;servlet-mapping&gt;\r\n    \t&lt;servlet-name&gt;hello&lt;\/servlet-name&gt;\r\n    \t&lt;url-pattern&gt;\/HelloServlet&lt;\/url-pattern&gt;\r\n  \t&lt;\/servlet-mapping&gt;\r\n\r\n\t&lt;filter&gt;\r\n\t\t&lt;filter-name&gt;SampleFilter&lt;\/filter-name&gt;\r\n\t\t&lt;filter-class&gt;filter.FilterTest&lt;\/filter-class&gt;\r\n\t&lt;\/filter&gt;\r\n\r\n\t&lt;filter-mapping&gt;\r\n\t\t&lt;filter-name&gt;SampleFilter&lt;\/filter-name&gt;\r\n\t\t&lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;\r\n\t&lt;\/filter-mapping&gt;\r\n\r\n&lt;\/web-app&gt;\r\n<\/pre>\n<div><\/div>\n<h2>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u767b\u9332\u306b\u4f7f\u3046\u30bf\u30b0<\/h2>\n<h3>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u767b\u9332\u306b\u4f7f\u3046\u30bf\u30b0<\/h3>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;web-app xmlns=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee&quot; xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd&quot; version=&quot;2.5&quot;&gt;\r\n\r\n   \t&lt;servlet&gt;\r\n\t\t&lt;servlet-name&gt;hello&lt;\/servlet-name&gt;\r\n\t\t&lt;servlet-class&gt;HelloServlet&lt;\/servlet-class&gt;\r\n\t&lt;\/servlet&gt;\r\n&lt;\/web-app&gt;\r\n<\/pre>\n<div><\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<th width=\"200\">\u30bf\u30b0\u540d<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>&lt;servlet&gt;<\/td>\n<td>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306b\u540d\u524d\u3092\u3064\u3051\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;servlet-class&gt;<\/td>\n<td>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u30af\u30e9\u30b9\u3092\u6307\u5b9a\u3059\u308b\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306f.\u3067\u533a\u5207\u308a\u307e\u3059\u3002\uff08\u4f8b\u3067\u306f\u3001app.\u3068\u3057\u3066\u3044\u307e\u3059\u3002\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u00a0\u2514&lt;servlet-name&gt;<\/td>\n<td>\u4efb\u610f\u306e\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u540d\u3092\u4ed8\u3051\u308b\u3002\uff08\u8907\u6570\u3042\u308b\u5834\u5408\u306f\u3001\u4e00\u610f\u306b\u3059\u308b\u5fc5\u8981\u3042\u308a\u3002\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div><\/div>\n<h3>\u00a0\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u306b\u4f7f\u3046\u30bf\u30b0<\/h3>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;web-app xmlns=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee&quot; xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd&quot; version=&quot;2.5&quot;&gt;\r\n  \t&lt;servlet-mapping&gt;\r\n    \t&lt;servlet-name&gt;hello&lt;\/servlet-name&gt;\r\n    \t&lt;url-pattern&gt;\/HelloServlet&lt;\/url-pattern&gt;\r\n  \t&lt;\/servlet-mapping&gt;\r\n&lt;\/web-app&gt;\r\n<\/pre>\n<div><\/div>\n<div>\n<div><\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<th width=\"200\">\u30bf\u30b0\u540d<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>&lt;servlet-mapping&gt;<\/td>\n<td>\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3092\u547c\u3073\u51fa\u3059\u969b\u306eURL\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;servlet-name&gt;<\/td>\n<td>\u30de\u30c3\u30d4\u30f3\u30b0\u5bfe\u8c61\u306e\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b\u3002&lt;servlet&gt;\u8981\u7d20\u3067\u6307\u5b9a\u3057\u305f\u8981\u7d20\u3068\u540c\u3058\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u2514&lt;url-pattern&gt;<\/td>\n<td>\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u547c\u3073\u51fa\u3059URL\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u30d5\u30a3\u30eb\u30bf\u306b\u4f7f\u3046\u30bf\u30b0<\/h2>\n<p>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u3068\u306f\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u5171\u901a\u51e6\u7406\u3092\u66f8\u304f\u6a5f\u80fd\u306e\u3053\u3068\u3067\u3001web.xml\u3078\u306e\u767b\u9332\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002\u66f8\u304d\u65b9\u306f\u3001\u666e\u901a\u306e\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3092\u767b\u9332\u3059\u308b\u66f8\u304d\u65b9\u306b\u4f3c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u8a73\u3057\u304f\u306f\u4e0b\u8a18\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"nvq5IiJHxU\"><p><a href=\"http:\/\/www.code-magagine.com\/?p=999\">\u3010\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3011\u5171\u901a\u51e6\u7406\u3092\u66f8\u304f\u306b\u306f\uff1f\uff08\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u306e\u5229\u7528\uff09<\/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=999&#038;embed=true#?secret=nvq5IiJHxU\" data-secret=\"nvq5IiJHxU\" width=\"500\" height=\"282\" title=\"&#8220;\u3010\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3011\u5171\u901a\u51e6\u7406\u3092\u66f8\u304f\u306b\u306f\uff1f\uff08\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u306e\u5229\u7528\uff09&#8221; &#8212; \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30de\u30ac\u30b8\u30f3\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<h3>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u306e\u5b9a\u7fa9\u306b\u4f7f\u3046\u30bf\u30b0<\/h3>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;web-app xmlns=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee&quot; xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd&quot; version=&quot;2.5&quot;&gt;\r\n\t&lt;filter&gt;\r\n\t\t&lt;filter-name&gt;SampleFilter&lt;\/filter-name&gt;\r\n\t\t&lt;filter-class&gt;filter.FilterTest&lt;\/filter-class&gt;\r\n\t&lt;\/filter&gt;\r\n&lt;\/web-app&gt;\r\n<\/pre>\n<\/div>\n<div><\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<th>\u30bf\u30b0\u540d<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>&lt;filter&gt;<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;filter-name&gt;<\/td>\n<td>\u30d5\u30a3\u30eb\u30bf\u306e\u540d\u524d\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u2514&lt;filter-class&gt;<\/td>\n<td>\u30d5\u30a3\u30eb\u30bf\u306e\u30af\u30e9\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<h3>\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u30d5\u30a3\u30eb\u30bf\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u306b\u4f7f\u3046\u30bf\u30b0<\/h3>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;web-app xmlns=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee&quot; xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd&quot; version=&quot;2.5&quot;&gt;\r\n\t&lt;filter-mapping&gt;\r\n\t\t&lt;filter-name&gt;SampleFilter&lt;\/filter-name&gt;\r\n\t\t&lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;\r\n\t&lt;\/filter-mapping&gt;\r\n\r\n&lt;\/web-app&gt;\r\n<\/pre>\n<\/div>\n<div><\/div>\n<div>\n<div><\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<th>\u30bf\u30b0\u540d<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>&lt;filter-mapping&gt;<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;filter-name&gt;<\/td>\n<td>\u00a0\u30d5\u30a3\u30eb\u30bf\u306e\u540d\u524d\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u2514&lt;url-pattern&gt;<\/td>\n<td>\u30d5\u30a3\u30eb\u30bf\u306e\u9069\u7528\u7bc4\u56f2\u3092\u6307\u5b9a\u3059\u308b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u306a\u304a\u3001<span style=\"color: #ff0000;\"><strong>\u8907\u6570\u306e\u30d5\u30a3\u30eb\u30bf\u3092\u66f8\u3044\u305f\u5834\u5408\u306f\u3001\u300c\u8a18\u8ff0\u3057\u305f\u9806\u300d\u306b\u30d5\u30a3\u30eb\u30bf\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/strong><\/span><\/p>\n<\/div>\n<\/div>\n<h2>JSP\u30da\u30fc\u30b8\u306e\u4e00\u62ec\u8a2d\u5b9a\u306b\u4f7f\u3046\u30bf\u30b0<\/h2>\n<p>\u4f8b<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;webapp&gt;\r\n\t&lt;jsp-config&gt;\r\n\t\t&lt;jsp-property-group&gt;\r\n\t\t\t&lt;url-pattern&gt;*.jsp&lt;\/url-pattern&gt;\r\n\t\t\t&lt;page-encoding&gt;UTF-8&lt;\/page-encoding&gt;\r\n\t\t\t&lt;include-prelude&gt;\/common\/header.jsp&lt;\/include-prelude&gt;\r\n\t\t\t&lt;include-coda&gt;\/common\/footer.jsp&lt;\/include-coda&gt;\r\n\t\t&lt;\/jsp-property-group&gt;\r\n\t&lt;\/jsp-config&gt;\r\n&lt;\/webapp&gt;\r\n<\/pre>\n<h3>\u5404\u9805\u76ee\u306e\u8aac\u660e<\/h3>\n<table>\n<tbody>\n<tr>\n<th>\u8981\u7d20\u540d<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>&lt;jsp-config&gt;<\/td>\n<td>JSP\u95a2\u9023\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;url-pattern&gt;<\/td>\n<td>\u8a2d\u5b9a\u3092\u9069\u7528\u3059\u308bURL\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;page-encoding&gt;<\/td>\n<td>JSP\u30da\u30fc\u30b8\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0(<span style=\"color: #ff0000;\"><strong>page\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306eengcoding\u3068\u540c\u7b49\u3067\u3059\u3002<\/strong><\/span>\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;scripting-invalid&gt;<\/td>\n<td>\u30b9\u30af\u30ea\u30d7\u30c8(\u30b9\u30af\u30ea\u30d7\u30c8\u30ec\u30c3\u30c8\u3001\u5f0f\u7b49)\u3092\u7121\u52b9\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;is-xml&gt;<\/td>\n<td>\u3053\u306e\u30da\u30fc\u30b8\u304cXML\u5f62\u5f0f\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;include-prelude&gt;<\/td>\n<td>\u5171\u901a\u30d8\u30c3\u30c0(<span style=\"color: #ff0000;\"><strong>include\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306b\u76f8\u5f53\u3057\u307e\u3059<\/strong><\/span>\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;include-coda&gt;<\/td>\n<td>\u5171\u901a\u30d5\u30c3\u30bf(<span style=\"color: #ff0000;\"><strong>include\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306b\u76f8\u5f53\u3057\u307e\u3059<\/strong><\/span>\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u251c&lt;deferred-syntax-allowed-as-literal&gt;<\/td>\n<td>\uff03[\uff5e]\u3068\u3044\u3046\u6587\u5b57\u5217\u30ea\u30c6\u30e9\u30eb\u3092\u8a31\u53ef\u3059\u308b\u304b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u2514&lt;trim-directive-whitespaces&gt;<\/td>\n<td>\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306e\u7a7a\u767d\u3092JSP\u51fa\u529b\u304b\u3089\u9664\u53bb\u3059\u308b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u9069\u7528\u30bf\u30a4\u30df\u30f3\u30b0<\/h3>\n<p>URL\u3067\u3001JSP\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u306b\u672c\u8a2d\u5b9a\u304c\u8aad\u307f\u8fbc\u307e\u308c\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5177\u4f53\u4f8b \u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u767b\u9332\u306b\u4f7f\u3046\u30bf\u30b0 \u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u767b\u9332\u306b\u4f7f\u3046\u30bf\u30b0 \u30bf\u30b0\u540d \u8aac\u660e &lt;servlet&gt; \u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306b\u540d\u524d\u3092\u3064\u3051\u308b\u3002 \u251c&lt;servlet-class&gt; \u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u30af\u30e9\u30b9\u3092\u6307\u5b9a\u3059\u308b [&hellip;]","protected":false},"author":1,"featured_media":1143,"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\/926"}],"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=926"}],"version-history":[{"count":25,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/926\/revisions"}],"predecessor-version":[{"id":20262,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/926\/revisions\/20262"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/1143"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=926"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}