当前位置: 代码迷 >> Web前端 >> web.xml配置异常页面跳转
  详细解决方案

web.xml配置异常页面跳转

热度:718   发布时间:2012-06-26 10:04:13.0
web.xml配置错误页面跳转
web.xml配置错误页面跳转(使用<error-page></error-page>)
  <welcome-file-list>
    <welcome-file>/index.html</welcome-file>
    <welcome-file>/welcome.jsp</welcome-file>
  </welcome-file-list>

  <error-page>
    <error-code>401</error-code>
    <location>/jsp/common/error.jsp</location>
  </error-page>
  <error-page>
    <error-code>403</error-code>
    <location>/jsp/common/error.jsp</location>
  </error-page>
  <error-page>
    <error-code>404</error-code>
    <location>/jsp/common/error.jsp</location>
  </error-page>
  <error-page>
    <error-code>500</error-code>
    <location>/jsp/common/error.jsp</location>
  </error-page>

  <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>
  相关解决方案