Java EE 企业应用系统开发 - HTTP 响应处理编程响应对象 响应对象功能和方法 HTTP 响应的内容 在 Web 服务器接收请求处理后,向客户端发送 HTTP 响应 (Response)。 O 响应的内容 ▶ 响应状态(Status Code) ▶ 响应头(Response Header) ▶ 响应体(Response Body) 大纲 HTTP 响应的内容 HTTP 响应对象 响应对象功能和方法 HTTP 响应状态行 表明响应的状态信息,如成功、失败、错误。 向客户端发送指定的错误信息码,可以是任意定义的整数。 1 response.setCharacterEncoding("GBK"); 2 response.sendError(580); O public void sendError(int sc, String msg) throws IOException 向客户端发送指定的错误信息码和自定义状态消息。 1 response.setCharacterEncoding("GBK"); setCharacterEncoding("GBK"); 2 response.sendError(580, "自定义错误"); 大纲 HTTP 响应的内容 HTTP 响应对象 响应对象功能和方法 设置响应头 当客户端接收到响应状态为 200 时,浏览器会继续接收响应头信 息,来确定响应体的类型和大小。 O public void setHeader(String name, String value) 将指定名称和值的响应头发送到客户端。0 码力 | 26 页 | 575.28 KB | 1 年前3
JAVA 应用与开发 - 泛型0 码力 | 35 页 | 587.40 KB | 1 年前3
Spring Framework Reference Documentation 4.3.26.RELEASEStandard and custom events Annotation-based event listeners Asynchronous Listeners Ordering listeners Generic events Convenient access to low-level resources Convenient ApplicationContext instantiation for configuration Environment-specific configuration Tomcat WebLogic, WebSphere, Resin, GlassFish, JBoss Generic Java applications Further Resources 12. Spring AOP APIs Introduction Pointcut API in Spring Concepts parameters with @RequestParam Mapping the request body with the @RequestBody annotation Mapping the response body with the @ResponseBody annotation Creating REST Controllers with the @RestController annotation0 码力 | 1323 页 | 4.08 MB | 1 年前3
Spring Framework Reference Documentation v4.3.2Standard and Custom Events Annotation-based Event Listeners Asynchronous Listeners Ordering Listeners Generic Events Convenient access to low-level resources Convenient ApplicationContext instantiation for configuration Environment-specific configuration Tomcat WebLogic, WebSphere, Resin, GlassFish, JBoss Generic Java applications Further Resources 12. Spring AOP APIs Introduction Pointcut API in Spring Concepts parameters with @RequestParam Mapping the request body with the @RequestBody annotation Mapping the response body with the @ResponseBody annotation Creating REST Controllers with the @RestController annotation0 码力 | 1311 页 | 4.07 MB | 1 年前3
Spring Framework Reference Documentation 4.3.26.RELEASElisteners ................................................................................... 157 Generic events ....................................................................................... 157 503 Mapping the request body with the @RequestBody annotation .................. 504 Mapping the response body with the @ResponseBody annotation ............. 505 Spring Framework Reference Documentation ..................................... 547 Support for the Cache-Control, ETag and Last-Modified response headers in Controllers ........................................................................0 码力 | 916 页 | 5.52 MB | 1 年前3
Spring Framework Reference Documentation v4.3.2Listeners .................................................................................. 150 Generic Events ....................................................................................... 150 496 Mapping the request body with the @RequestBody annotation .................. 497 Mapping the response body with the @ResponseBody annotation ............. 498 Creating REST Controllers with the @RestController ..................................... 539 Support for the Cache-Control, ETag and Last-Modified response headers in Controllers ........................................................................0 码力 | 907 页 | 5.46 MB | 1 年前3
Spring Framework 1.2.5 Changelogpopulation of it * AbstractJasperReportsSingleFormatView applies the configured exporter encoding as HTTP response encoding Changes in version 1.2.3 (26.7.2005) ------------------------------------ Package org class with ToStringStyler/ValueStyler strategy mechanism Package org.springframework.dao * added generic DaoSupport base class, defining a logger and "initDao" method and pre-implementing "afterPropertiesSet" suspension even from beforeCompletion/afterCompletion * reworked CciDaoSupport class to extend the new generic DaoSupport base class Package org.springframework.jdbc * added "connectionProperties" bean property0 码力 | 79 页 | 226.37 KB | 1 年前3
Spring Framework 1.2.4 Changelogof it * AbstractJasperReportsSingleFormatView applies the configured exporter encoding as HTTP response encoding Changes in version 1.2.3 (26.7.2005) ------------------------------------ Package org class with ToStringStyler/ValueStyler strategy mechanism Package org.springframework.dao * added generic DaoSupport base class, defining a logger and "initDao" method and pre-implementing "afterPropertiesSet" suspension even from beforeCompletion/afterCompletion * reworked CciDaoSupport class to extend the new generic DaoSupport base class Package org.springframework.jdbc * added "connectionProperties" bean property0 码力 | 77 页 | 223.73 KB | 1 年前3
Spring Framework 1.2.2 Changelogclass with ToStringStyler/ValueStyler strategy mechanism Package org.springframework.dao * added generic DaoSupport base class, defining a logger and "initDao" method and pre-implementing "afterPropertiesSet" suspension even from beforeCompletion/afterCompletion * reworked CciDaoSupport class to extend the new generic DaoSupport base class Package org.springframework.jdbc * added "connectionProperties" bean property the driver * SQLState/SQLErrorCodeSQLExceptionTranslator always include SQL in message, even for generic DataAccessExceptions * UncategorizedSQLException includes SQL state and error code in message, to0 码力 | 72 页 | 205.76 KB | 1 年前3
Spring Framework 1.2.8 Changelogliteral value * fixed AbstractJasperReportsView and subclasses to be compatible with J2EE <1.4 (avoid response.setCharacterEncoding) * AbstractJasperReportsView autodetects a JDBC DataSource in the model, as population of it * AbstractJasperReportsSingleFormatView applies the configured exporter encoding as HTTP response encoding Changes in version 1.2.3 (26.7.2005) ------------------------------------ Package org class with ToStringStyler/ValueStyler strategy mechanism Package org.springframework.dao * added generic DaoSupport base class, defining a logger and "initDao" method and pre-implementing "afterPropertiesSet"0 码力 | 89 页 | 254.65 KB | 1 年前3
共 389 条
- 1
- 2
- 3
- 4
- 5
- 6
- 39













