{"id":484,"date":"2016-01-20T11:20:31","date_gmt":"2016-01-20T02:20:31","guid":{"rendered":"http:\/\/esoro.jp\/?p=484"},"modified":"2016-01-27T10:29:16","modified_gmt":"2016-01-27T01:29:16","slug":"%e7%94%bb%e9%9d%a2%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%ae%e3%83%ad%e3%82%b0%e5%87%ba%e5%8a%9b%e3%82%92%e6%95%b4%e7%90%86","status":"publish","type":"post","link":"https:\/\/esoro.jp\/?p=484","title":{"rendered":"\u753b\u9762\u30a8\u30e9\u30fc\u306e\u30ed\u30b0\u51fa\u529b\u3092\u6574\u7406"},"content":{"rendered":"<p>\u4eca\u4f5c\u3063\u3066\u3044\u308bJavaEE\u30a2\u30d7\u30ea\u3067\u3059\u304c\u3001\u753b\u9762\u30a8\u30e9\u30fc\u767a\u751f\u6642\u306e\u30ed\u30b0\u51fa\u529b\u3092\u691c\u8a0e\u3057\u307e\u3057\u305f\u3002\u307e\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3067\u3042\u308bWebLogic\u304c\u52dd\u624b\u306b\u30ed\u30b0\u3092\u51fa\u3057\u3066\u304f\u308c\u307e\u3059\u304c\u3001\u30a8\u30e9\u30fc\u4ee5\u5916\u306b\u3082\u52dd\u624b\u306b\u51fa\u308b\u306e\u3067\u91cf\u304c\u591a\u304f\u3066\u898b\u308b\u306e\u304c\u8f9b\u3044\u3057\u3001\u30a2\u30d7\u30ea\u3068\u3057\u3066\u306f\u5225\u9014log4j2\u3067\u30ed\u30ae\u30f3\u30b0\u3059\u308b\u65b9\u5411\u306b\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u753b\u9762\u30a8\u30e9\u30fc\u767a\u751f\u6642\u3082log4j\u51fa\u529b\u306b\u7d71\u4e00\u3059\u308b\u3068\u3044\u3046\u8981\u4ef6\u306b\u306a\u308a\u307e\u3059\u3002WebLogic\u3067log4j\u3068\u30ed\u30b0\u3092\u9023\u643a\u3055\u305b\u308b\u3068\u304bFilter\u4f7f\u3046\u3068\u304b\u3044\u308d\u3044\u308d\u3084\u308a\u65b9\u306f\u3042\u308a\u305d\u3046\u3067\u3057\u305f\u304c\u3001\u753b\u9762\u500b\u3005\u306b\u624b\u3092\u5165\u308c\u305a\u306b\u6700\u3082\u7c21\u5358\u306a\u3084\u308a\u65b9\u306f\u7121\u3044\u304b\u306a\u3068\u8003\u3048\u305f\u3068\u3053\u308d\u3001\u753b\u9762\u30a8\u30e9\u30fc\u767a\u751f\u6642\u306f\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u306b\u9077\u79fb\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u3044\u3066\u3001\u305d\u306e\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u3067\u30ed\u30b0\u51fa\u529b\u3055\u305b\u308b\u3068\u3044\u3046\u5f62\u306b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>web.xml\u629c\u7c8b\uff08\u4eca\u306e\u6240\u30fb\u30fb\u30fb\uff09<\/p>\n<pre class=\"lang:xhtml decode:true \" title=\"web.xml\" >  &lt;error-page&gt;\r\n    &lt;exception-type&gt;javax.servlet.ServletException&lt;\/exception-type&gt;\r\n    &lt;location&gt;\/errors\/index.xhtml&lt;\/location&gt;\r\n  &lt;\/error-page&gt;\r\n  &lt;error-page&gt;\r\n    &lt;exception-type&gt;javax.ejb.EJBException&lt;\/exception-type&gt;\r\n    &lt;location&gt;\/errors\/index.xhtml&lt;\/location&gt;\r\n  &lt;\/error-page&gt;\r\n  &lt;error-page&gt;\r\n    &lt;error-code&gt;403&lt;\/error-code&gt;\r\n    &lt;location&gt;\/errors\/403.xhtml&lt;\/location&gt;\r\n  &lt;\/error-page&gt;\r\n<\/pre>\n<p>\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u7528JSF\u7ba1\u7406Bean<\/p>\n<pre class=\"lang:java decode:true \" title=\"ErrorHander.java\" >@ManagedBean(name=\"errorPage\")\r\npublic class ErrorHander {\r\n\tprotected static Logger logger=LogManager.getLogger();\r\n\tprivate String message;\r\n\t\r\n\t\/** \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u51fa\u529b *\/\r\n\tpublic String getMessage() {\r\n        FacesContext context = FacesContext.getCurrentInstance();\r\n        ExternalContext externalContext = context.getExternalContext();\r\n        HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();\r\n\r\n\t\tString errorURI = \r\n\t\t\t\t(String) request.getAttribute(\"javax.servlet.error.request_uri\");\r\n\r\n\t\tmessage = (String)request.getAttribute(\"javax.servlet.error.message\");\r\n\t\tThrowable throwable = (Throwable) \r\n\t\t\t\trequest.getAttribute(\"javax.servlet.error.exception\");\r\n\r\n\t\tlogger.error(\"View Error URL={}\", errorURI, throwable);\r\n\t\treturn message;\r\n\t}\r\n\r\n\tpublic void setMessage(String message) {\r\n\t\tthis.message = message;\r\n\t}\r\n}\r\n<\/pre>\n<p>\u6700\u5f8c\u306bweb.xml\u3067\u6307\u5b9a\u3057\u305f\/errors\/index.xhtml\u3067\u3001\u30a8\u30e9\u30fc\u5185\u5bb9\u306f\u898b\u305b\u306a\u3044\u3088\u3046\u306b\u4e0b\u8a18\u3092\u5fcd\u3070\u305b\u3066\u304a\u3051\u3070\u3001\u7ba1\u7406Bean\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u308b\u3068\u3044\u3046\u5f62\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:xhtml decode:true \" title=\"errors\/index.xhtml\" >&lt;h:outputLabel id=\"execMsg\" value=\"#{errorPage.message}\" style=\"visibility:hidden;\"\/&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u4f5c\u3063\u3066\u3044\u308bJavaEE\u30a2\u30d7\u30ea\u3067\u3059\u304c\u3001\u753b\u9762\u30a8\u30e9\u30fc\u767a\u751f\u6642\u306e\u30ed\u30b0\u51fa\u529b\u3092\u691c\u8a0e\u3057\u307e\u3057\u305f\u3002 &hellip; <a href=\"https:\/\/esoro.jp\/?p=484\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,6],"tags":[],"_links":{"self":[{"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/posts\/484"}],"collection":[{"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/esoro.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=484"}],"version-history":[{"count":0,"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/posts\/484\/revisions"}],"wp:attachment":[{"href":"https:\/\/esoro.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/esoro.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/esoro.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}