我想在发生错误时隐藏用户的apache tomcat服务器的详细信息。例如,我希望隐藏附加屏幕截图中突出显示的信息,我想在这个地方发送自己的消息。{{3 }}
答案 0 :(得分:0)
在您的Tomcat web.xml文件中,编辑以在下面输入条目以获得您的自定义页面
<error-page>
<error-code>404</error-code>
<location>/NotFound.jsp</location>
</error-page>
答案 1 :(得分:0)
使用RestFul(jersey / RESTeasy)构建Web应用程序并编写自定义错误代码
here is the link explaining how RestFul handles exception/faults encapsulating server errors too