[英]How to change default error page for tomcat on server level and not on the application level?
我在 Tomcat 上有一个应用程序作为https:abc:8443/appname/login
我使用。 我已经配置了应用程序,如果我搜索https://abc:8443/appname/prasfag.txt
,我的自定义错误页面就会显示出来。
但是,如果我搜索https://abc:8443/prags.txt
,则 tomcat 显示默认的错误 404 页面。 我希望 tomcat 在我访问https://abc:8443/prags.txt
时显示自定义页面。
我该如何配置?
在您的 tomcat web.xml 中,您可以配置 Z293C9EA246FF9985DC686F62A650F7 重定向页面。 只需插入
<error-page>
<error-code>-xxx-</error-code>
<location>/your/custom/html/path.html</location>
</error-page>
在你的 web.xml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.