java代码中经常碰到各种需要处理异常的时候,比如什么IOException SQLException NullPointException等等,在开发web项目中,遇到异常,我现在做的就是将其抛出,即在catch中throw new Exception().这个throw new Exception也是有讲究的. 贴出异常简略图: 异常就分两大类:checked检查和unchecked非检查异常. checkedException在编写代码的时候就必须要进行异常处理,unche…
在HtttpServletResponse类中有关于状态码的描述. static int SC_ACCEPTED Status code (202) indicating that a request was accepted for processing, but was not completed. 状态码(202)表明处理的请求被接受,但未能完成. static int SC_BAD_GATEWAY Status code (502) indicating that the HTTP se…
200 - OK,服务器成功返回网页 - Standard response for successful HTTP requests. 301 - Moved Permanently(永久跳转),请求的网页已永久跳转到新位置. - This and all future requests should be directed to the given. 403 - Forbidden(禁止访问),服务器拒绝请求 - forbidden request (matches a…
一些常见的http状态码 200 - OK,服务器成功返回网页 - Standard response for successful HTTP requests. 301 - Moved Permanently(永久跳转),请求的网页已永久跳转到新位置. - This and all future requests should be directed to the given. 403 - Forbidden(禁止访问),服务器拒绝请求 - forbidden reques…