Java 应用与开发 - 异常处理
异常的概念及分类 Java 异常处理机制 Java 应用与开发 异常处理 王晓东 wangxiaodong@ouc.edu.cn 中国海洋大学 October 30, 2018 大纲 异常的概念及分类 Java 异常处理机制 学习目标 1. 掌握 Java 异常的概念和分类 2. 深入理解 Java 异常处理机制 大纲 异常的概念及分类 Java 异常处理机制 大纲 异常的概念及分类 Java 异常处理机制 大纲 异常的概念及分类 Java 异常处理机制 C++ 中的异常处理 O 《The C++ Programming Language》 ▶ 一个库的作者可以检测出发生了运行时错误,但一般不知道 怎样去处理它们(因为和用户具体的应用有关); ▶ 另一方面,库的用户知道怎样处理这些错误,但却无法检查 它们何时发生(如果能检测,就可以再用户的代码里处理 了,不用留给库去发现)。 了,不用留给库去发现)。 提供异常处理机制的的基本思想 让一个函数在发现了自己无法处理的错误时抛出(throw)一个 异常,然后它的(直接或者间接)调用者能够处理这个问题。 O 《C++ primer》 将问题检测和问题处理相分离。 (Exceptions let us separate problem detection from problem resolution.) 大纲 异常的概念及分类0 码力 | 33 页 | 626.40 KB | 1 年前3Java EE 企业应用系统设计 - HTTP 请求处理编程
大纲 HTTP 请求内容 Java EE 请求对象 Java EE 企业应用系统设计 HTTP 请求处理编程 王晓东 wangxiaodong@ouc.edu.cn 中国海洋大学 November 17, 2018 大纲 HTTP 请求内容 Java EE 请求对象 学习目标 1. 理解 Web 的工作模式,掌握 HTTP 协议的特点以及 HTTP 请求中包含哪些信息。 2. 理解 Web 工作模式 Web 通常使用请求�响应模式。 ▶ 客户端(浏览器)向服务器发出 HTTP 请求,在 HTTP 请 求中包含传递到服务器的数据; ▶ Web 服务器接收到请求,对请求进行处理。 ▶ Web 服务器使用 HTTP 向客户端发送响应。 ▶ 客户端接收到响应后,进行显示或页面跳转。 大纲 HTTP 请求内容 Java EE 请求对象 HTTP 请求中包含的信息 HTTP Referer 浏览器是从哪个页面来的 Cookie 浏览器保存的 cookie 对象 Java EE Web 组件 Servlet 和 JSP 中可以使用请求对象的方法 读取这些请求内容,进而进行相应的处理。 大纲 HTTP 请求内容 Java EE 请求对象 HTTP 请求中包含的信息 O 请求体 每次 HTTP 请求时,在请求头之后会有一个空行,接下来是请 求中包含的提交数据,即请求体。0 码力 | 27 页 | 565.27 KB | 1 年前3Java EE 企业应用系统开发 - HTTP 响应处理编程
大纲 HTTP 响应的内容 HTTP 响应对象 响应对象功能和方法 Java EE 企业应用系统开发 HTTP 响应处理编程 王晓东 wangxiaodong@ouc.edu.cn 中国海洋大学 November 17, 2018 大纲 HTTP 响应的内容 HTTP 响应对象 响应对象功能和方法 学习目标 1. 掌握 HTTP 响应的内容,包括响应状态行、响应头、响应 体。 2 接下来⋯ HTTP 响应的内容 HTTP 响应对象 响应对象功能和方法 大纲 HTTP 响应的内容 HTTP 响应对象 响应对象功能和方法 HTTP 响应的内容 在 Web 服务器接收请求处理后,向客户端发送 HTTP 响应 (Response)。 O 响应的内容 ▶ 响应状态(Status Code) ▶ 响应头(Response Header) ▶ 响应体(Response Body) 收到请求,没有处理完。 ▶ 2xx: 成功,响应完毕。 ▶ 3xx: 重定向,到另一个请求中去。 ▶ 4xx: 失败,没有请求的文档等。 ▶ 5xx: 内部错误,代码出现异常。 3. 状态描述。 大纲 HTTP 响应的内容 HTTP 响应对象 响应对象功能和方法 响应头 Web 服务器在向客户端发送 HTTP 响应时也可以包含响应头, 来指示客户端浏览器如何处理响应体,主要包括响应的类型、字0 码力 | 26 页 | 575.28 KB | 1 年前3Spring Boot 2.5.13 Reference Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 12.12.3. Sanitize Sensitive Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . on “Error Handling” for details of how to register handlers in the servlet container. 12.12.3. Sanitize Sensitive Values Information returned by the env and configprops endpoints can be somewhat sensitive configprops endpoints can be replaced using management.endpoint.env.keys-to-sanitize and management.endpoint.configprops.keys-to-sanitize respectively. Alternatively, additional patterns can be configured0 码力 | 702 页 | 13.82 MB | 1 年前3Spring Boot 2.5.3 Reference Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 12.12.3. Sanitize Sensitive Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . on “Error Handling” for details of how to register handlers in the servlet container. 12.12.3. Sanitize Sensitive Values Information returned by the env and configprops endpoints can be somewhat sensitive configprops endpoints can be replaced using management.endpoint.env.keys-to-sanitize and management.endpoint.configprops.keys-to-sanitize respectively. Alternatively, additional patterns can be configured0 码力 | 692 页 | 13.67 MB | 1 年前3Spring Boot 2.5.10 Reference Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 12.12.3. Sanitize Sensitive Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . on “Error Handling” for details of how to register handlers in the servlet container. 12.12.3. Sanitize Sensitive Values Information returned by the env and configprops endpoints can be somewhat sensitive configprops endpoints can be replaced using management.endpoint.env.keys-to-sanitize and management.endpoint.configprops.keys-to-sanitize respectively. Alternatively, additional patterns can be configured0 码力 | 695 页 | 13.72 MB | 1 年前3Spring Boot 2.5.x Reference Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 12.12.3. Sanitize Sensitive Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . on “Error Handling” for details of how to register handlers in the servlet container. 12.12.3. Sanitize Sensitive Values Information returned by the env and configprops endpoints can be somewhat sensitive configprops endpoints can be replaced using management.endpoint.env.keys-to-sanitize and management.endpoint.configprops.keys-to-sanitize respectively. Alternatively, additional patterns can be configured0 码力 | 703 页 | 13.84 MB | 1 年前3Spring Boot 2.5.5 Reference Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 12.12.3. Sanitize Sensitive Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . on “Error Handling” for details of how to register handlers in the servlet container. 12.12.3. Sanitize Sensitive Values Information returned by the env and configprops endpoints can be somewhat sensitive configprops endpoints can be replaced using management.endpoint.env.keys-to-sanitize and management.endpoint.configprops.keys-to-sanitize respectively. Alternatively, additional patterns can be configured0 码力 | 692 页 | 13.68 MB | 1 年前3Spring Boot 2.5.0-M3 Reference Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 9.13.3. Sanitize Sensitive Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . on “Error Handling” for details of how to register handlers in the servlet container. 9.13.3. Sanitize Sensitive Values Information returned by the env and configprops endpoints can be somewhat sensitive configprops endpoints can be replaced using management.endpoint.env.keys-to-sanitize and management.endpoint.configprops.keys-to-sanitize respectively. Alternatively, additional patterns can be configured0 码力 | 681 页 | 13.41 MB | 1 年前3Spring Boot 2.5.12 Reference Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 12.12.3. Sanitize Sensitive Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . on “Error Handling” for details of how to register handlers in the servlet container. 12.12.3. Sanitize Sensitive Values Information returned by the env and configprops endpoints can be somewhat sensitive configprops endpoints can be replaced using management.endpoint.env.keys-to-sanitize and management.endpoint.configprops.keys-to-sanitize respectively. Alternatively, additional patterns can be configured0 码力 | 702 页 | 13.82 MB | 1 年前3
共 245 条
- 1
- 2
- 3
- 4
- 5
- 6
- 25