请问大家一般错误页面怎么处理  具体点- -比如404  500 503= = 等一些错误  怎么配置转跳到指定页面比如 CSDN 404 你懂的- - 

解决方案 »

  1.   

    在web.xml中配置的。 <error-page>
    <error-code>404</error-code>
    <location>/error.jsp</location>
    </error-page>
    <error-page>
    <error-code>500</error-code>
    <location>/error.jsp</location>
    </error-page>
      

  2.   

    Struts1异常处理
    http://wjt276.iteye.com/blog/690323
      

  3.   

    web.xml中配置
    <error-page>
            <error-code>404</error-code>
            <location>/error.jsp</location>
        </error-page>
        <error-page>
            <error-code>500</error-code>
            <location>/error.jsp</location>
        </error-page>


      

  4.   

    http://blog.csdn.net/sanshiqiduer/article/details/3168348
      

  5.   

    HttpURLConnection字段摘要 
    protected  int chunkLength 
              使用存储块编码流模式进行输出时的存储块长度。 
    protected  int fixedContentLength 
              使用固定长度流模式时的固定内容长度。 
    static int HTTP_ACCEPTED 
              HTTP 状态码 202:Accepted。 
    static int HTTP_BAD_GATEWAY 
              HTTP 状态码 502:Bad Gateway。 
    static int HTTP_BAD_METHOD 
              HTTP 状态码 405:Method Not Allowed。 
    static int HTTP_BAD_REQUEST 
              HTTP 状态码 400:Bad Request。 
    static int HTTP_CLIENT_TIMEOUT 
              HTTP 状态码 408:Request Time-Out。 
    static int HTTP_CONFLICT 
              HTTP 状态码 409:Conflict。 
    static int HTTP_CREATED 
              HTTP 状态码 201:Created。 
    static int HTTP_ENTITY_TOO_LARGE 
              HTTP 状态码 413:Request Entity Too Large。 
    static int HTTP_FORBIDDEN 
              HTTP 状态码 403:Forbidden。 
    static int HTTP_GATEWAY_TIMEOUT 
              HTTP 状态码 504:Gateway Timeout。 
    static int HTTP_GONE 
              HTTP 状态码 410:Gone。 
    static int HTTP_INTERNAL_ERROR 
              HTTP 状态码 500:Internal Server Error。 
    static int HTTP_LENGTH_REQUIRED 
              HTTP 状态码 411:Length Required。 
    static int HTTP_MOVED_PERM 
              HTTP 状态码 301:Moved Permanently。 
    static int HTTP_MOVED_TEMP 
              HTTP 状态码 302:Temporary Redirect。 
    static int HTTP_MULT_CHOICE 
              HTTP 状态码 300:Multiple Choices。 
    static int HTTP_NO_CONTENT 
              HTTP 状态码 204:No Content。 
    static int HTTP_NOT_ACCEPTABLE 
              HTTP 状态码 406:Not Acceptable。 
    static int HTTP_NOT_AUTHORITATIVE 
              HTTP 状态码 203:Non-Authoritative Information。 
    static int HTTP_NOT_FOUND 
              HTTP 状态码 404:Not Found。 
    static int HTTP_NOT_IMPLEMENTED 
              HTTP 状态码 501:Not Implemented。 
    static int HTTP_NOT_MODIFIED 
              HTTP 状态码 304:Not Modified。 
    static int HTTP_OK 
              HTTP 状态码 200:OK。 
    static int HTTP_PARTIAL 
              HTTP 状态码 206:Partial Content。 
    static int HTTP_PAYMENT_REQUIRED 
              HTTP 状态码 402:Payment Required。 
    static int HTTP_PRECON_FAILED 
              HTTP 状态码 412:Precondition Failed。 
    static int HTTP_PROXY_AUTH 
              HTTP 状态码 407:Proxy Authentication Required。 
    static int HTTP_REQ_TOO_LONG 
              HTTP 状态码 414:Request-URI Too Large。 
    static int HTTP_RESET 
              HTTP 状态码 205:Reset Content。 
    static int HTTP_SEE_OTHER 
              HTTP 状态码 303:See Other。 
    static int HTTP_SERVER_ERROR 
              已过时。 放错了位置,它不应该存在。 
    static int HTTP_UNAUTHORIZED 
              HTTP 状态码 401:Unauthorized。 
    static int HTTP_UNAVAILABLE 
              HTTP 状态码 503:Service Unavailable。 
    static int HTTP_UNSUPPORTED_TYPE 
              HTTP 状态码 415:Unsupported Media Type。 
    static int HTTP_USE_PROXY 
              HTTP 状态码 305:Use Proxy。 
    static int HTTP_VERSION 
              HTTP 状态码 505:HTTP Version Not Supported。 
    protected  boolean instanceFollowRedirects 
              如果为 true,则协议自动执行重定向。 
    protected  String method 
              HTTP 方法(GET、POST、PUT 等)。 
    protected  int responseCode 
              表示三位字数的 HTTP 状态码 (Status-Code) 的 int。 
    protected  String responseMessage 
              HTTP 响应消息。