需求:
系统上线之后不希望用户看到各种错误信息以及通过域名访问直接定位到首页
实现:
web.xml中配置各种error和welcome:
<error-page> <error-code>404</error-code> <location>/usr/tologin</location> </error-page> <error-page> <error-code>500</error-code> <location>/usr/tologin</location> </error-page> <welcome-file-list> <welcome-file>/usr/tologin</welcome-file> </welcome-file-list>