admin管理员组文章数量:1315777
I need to change the default Jetty error page (specifically I want to remove the part where the requested URI appears in the html response), I tried several things but it does not seem to work.
I expect that when I do a GET to an endpoint that is configured for POST only, get the custom error page defined in my file 405.html, but currently I keep getting the default jetty error page.
I needed to do the same but for 404 errors and it worked perfectly, just by adding the following to my web.xml file:
<error-page>
<error-code>404</error-code>
<location>/404.html</location>
</error-page>
I tried to do the same but for 405 error, and it didn't work. I have searched for documentation but it seems like no one ever has faced this same issue.
本文标签: javaHow can I change jetty default 405 error pageStack Overflow
版权声明:本文标题:java - How can I change jetty default 405 error page? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741991312a2409162.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论