我在web.xml中配置我的error-page,例如:<error-page><error-code>404</error-code><location>/error.jsp</location></error-page>。
如果我在浏览器中放入一个不能退出的网址,例如http: //localhost:8080/mywebsite/a,它会显示error.jsp的内容,但URL in browser is .But http: //localhost:8080/mywebsite/error.jsp,它仍然是http: //localhost:8080/mywebsite/a为什么?如果将URL设置为error.jsp,该怎么办?
我之所以这样问,是因为我使用IBM AppScan扫描了这个URL,它显示response status为200OK。
发布于 2013-11-28 16:04:20
重写URL以向用户显示他/她已访问错误页面是没有意义的。事实上,如果你不太小心,它可能会暴露出你的应用程序的结构,这可能是有害的。
http://yourhost/something/invalid/url对任何恶意用户都没有多大帮助。
但
http://yourhost/pages/errorPages/404Page.jsp
向用户公开了大量关于web应用程序结构的关键信息。
https://stackoverflow.com/questions/20260509
复制相似问题