在web.xml中配置
    <error-page>
        <error-code>400</error-code>  错误代码
        <location>/index.jsp</location>   出现的页面
    </error-page> 
    <error-page>
        <error-code>403</error-code>
        <location>/403.jsp</location>
    </error-page>
    <error-page>
        <error-code>505</error-code>
        <location>/505.jsp</location>
    </error-page>
等等
你也配置其他的异常      <error-page>
        <exception-type>java.io.IOException</exception-type>  IO类异常
        <location>/ioerror.jsp</location>                      页面
    </error-page>

解决方案 »

  1.   

    可以在web.xml中设定
    <error-code>和<error-page>
    根据特定的错误码调用相应的error-page给客户
      

  2.   

    前面两位都已经说了,照着做就好了!
    如果是用STRUTS的话,就比较好管理.
      

  3.   

    <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
        <error-page>
    <error-code>400</error-code>
    <location>/sysAdmin/login.htm</location>
    </error-page>    
    </web-app>不管用啊
      

  4.   

    我用的是tomcat4.1.18,不起作用啊/