 Java 应用与开发 - Servlet 编程Servlet 示例 类定义 编写接收 HTTP 请求并进行 HTTP 响应的 Servlet 需要继承 javax.servlet.http.HttpServlet。 1 public class LoginAction extends HttpServlet { 2 // Code goes on. 3 } 大纲 Web 基础 Servlet 概述 Servlet 编程 Servlet 生命周期 生命周期 Servlet 配置 Servlet 部署 Servlet 示例 重写 doGet 方法 父类 HttpServlet 的 doGet 方法是空的,没有实现任何代码,子 类需要重写此方法。 2 public void doGet(HttpServletRequest request, HttpServletResponse response) 3 throws ServletException doGet() doPost() Get Request Post Request Response Response Web Server HttpServlet subclass 注意: 方法由 HttpServlet 的子类实现 大纲 Web 基础 Servlet 概述 Servlet 编程 Servlet 生命周期 Servlet 配置 Servlet 部署 Servlet0 码力 | 50 页 | 725.36 KB | 1 年前3 Java 应用与开发 - Servlet 编程Servlet 示例 类定义 编写接收 HTTP 请求并进行 HTTP 响应的 Servlet 需要继承 javax.servlet.http.HttpServlet。 1 public class LoginAction extends HttpServlet { 2 // Code goes on. 3 } 大纲 Web 基础 Servlet 概述 Servlet 编程 Servlet 生命周期 生命周期 Servlet 配置 Servlet 部署 Servlet 示例 重写 doGet 方法 父类 HttpServlet 的 doGet 方法是空的,没有实现任何代码,子 类需要重写此方法。 2 public void doGet(HttpServletRequest request, HttpServletResponse response) 3 throws ServletException doGet() doPost() Get Request Post Request Response Response Web Server HttpServlet subclass 注意: 方法由 HttpServlet 的子类实现 大纲 Web 基础 Servlet 概述 Servlet 编程 Servlet 生命周期 Servlet 配置 Servlet 部署 Servlet0 码力 | 50 页 | 725.36 KB | 1 年前3
 servlet mechanismdoGet() doPost() Get Request Post Request Response Response Web Server HttpServlet subclass 注意: 方法由 HttpServlet 的子类实现0 码力 | 1 页 | 16.55 KB | 1 年前3 servlet mechanismdoGet() doPost() Get Request Post Request Response Response Web Server HttpServlet subclass 注意: 方法由 HttpServlet 的子类实现0 码力 | 1 页 | 16.55 KB | 1 年前3
 《Java 应用与开发》课程讲义 - 王晓东HTTP 响应的 Servlet 需要继承 javax.servlet.http.HttpServlet。 1 public class LoginAction extends HttpServlet { 2 // Code goes on. 3 } 16.3.3 重写 doGet 方法 父类 HttpServlet 的 doGet 方法是空的,没有实现任何代码,子类需要重写此方法。 2 public doGet() doPost() Get Request Post Request Response Response Web Server HttpServlet subclass 注意: 方法由 HttpServlet 的子类实现 图 16.2 Servlet 处理流程 16.5 Servlet 配置 • Servlet 作为 Web 组件可以处理 HTTP 请求/响应,因此对外要求一个唯一的 例如 Servlet 类 LoginAction: 1 package ouc.java. servlet ; 2 public class LoginAction extends HttpServlet { 3 // 4 } 存放路径为:/WEB-INF/classes/ouc/java/servlet/LoginAction.class . . . . . . . . . . .0 码力 | 330 页 | 6.54 MB | 1 年前3 《Java 应用与开发》课程讲义 - 王晓东HTTP 响应的 Servlet 需要继承 javax.servlet.http.HttpServlet。 1 public class LoginAction extends HttpServlet { 2 // Code goes on. 3 } 16.3.3 重写 doGet 方法 父类 HttpServlet 的 doGet 方法是空的,没有实现任何代码,子类需要重写此方法。 2 public doGet() doPost() Get Request Post Request Response Response Web Server HttpServlet subclass 注意: 方法由 HttpServlet 的子类实现 图 16.2 Servlet 处理流程 16.5 Servlet 配置 • Servlet 作为 Web 组件可以处理 HTTP 请求/响应,因此对外要求一个唯一的 例如 Servlet 类 LoginAction: 1 package ouc.java. servlet ; 2 public class LoginAction extends HttpServlet { 3 // 4 } 存放路径为:/WEB-INF/classes/ouc/java/servlet/LoginAction.class . . . . . . . . . . .0 码力 | 330 页 | 6.54 MB | 1 年前3
 Spring Framwork Web on Servlet Stack v5.3.36 SNAPSHOTstraightforward manner, without the need for arbitrary mappings. InternalResourceViewResolver Convenient subclass of UrlBasedViewResolver that supports InternalResourceView (in effect, Servlets and JSPs) and setViewClass(..). See the UrlBasedViewResolver javadoc for details. FreeMarkerViewResolver Convenient subclass of UrlBasedViewResolver that supports FreeMarkerView and custom subclasses of them. ContentN Controller methods do not need to change. A response wrapper, applied in javax.servlet.http.HttpServlet, ensures a Content-Length header is set to the number of bytes written (without actually writing0 码力 | 259 页 | 3.58 MB | 1 年前3 Spring Framwork Web on Servlet Stack v5.3.36 SNAPSHOTstraightforward manner, without the need for arbitrary mappings. InternalResourceViewResolver Convenient subclass of UrlBasedViewResolver that supports InternalResourceView (in effect, Servlets and JSPs) and setViewClass(..). See the UrlBasedViewResolver javadoc for details. FreeMarkerViewResolver Convenient subclass of UrlBasedViewResolver that supports FreeMarkerView and custom subclasses of them. ContentN Controller methods do not need to change. A response wrapper, applied in javax.servlet.http.HttpServlet, ensures a Content-Length header is set to the number of bytes written (without actually writing0 码力 | 259 页 | 3.58 MB | 1 年前3
 跟我学Shiro - 张开涛@WebServlet(name = "loginServlet", urlPatterns = "/login") public class LoginServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws "formFilterLoginServlet", urlPatterns = "/formfilterlogin") public class FormFilterLoginServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws @WebServlet(name = "permissionServlet", urlPatterns = "/permission") public class PermissionServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws0 码力 | 219 页 | 4.16 MB | 10 月前3 跟我学Shiro - 张开涛@WebServlet(name = "loginServlet", urlPatterns = "/login") public class LoginServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws "formFilterLoginServlet", urlPatterns = "/formfilterlogin") public class FormFilterLoginServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws @WebServlet(name = "permissionServlet", urlPatterns = "/permission") public class PermissionServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws0 码力 | 219 页 | 4.16 MB | 10 月前3
 Spring Boot 1.3.0.M2 Reference Documentation toString(), containsString("World")); } } TestRestTemplate TestRestTemplate is a convenience subclass of Spring’s RestTemplate that is useful in integration tests. You can get a vanilla template or The first step in producing a deployable war file is to provide a SpringBootServletInitializer subclass and override its configure method. This makes use of Spring Framework’s Servlet 3.0 support and CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES) or the fully-qualified class name of a PropertyNamingStrategy subclass spring.jackson.deserialization.*= # see Jackson's DeserializationFeature spring.jackson.generator0 码力 | 269 页 | 1.43 MB | 1 年前3 Spring Boot 1.3.0.M2 Reference Documentation toString(), containsString("World")); } } TestRestTemplate TestRestTemplate is a convenience subclass of Spring’s RestTemplate that is useful in integration tests. You can get a vanilla template or The first step in producing a deployable war file is to provide a SpringBootServletInitializer subclass and override its configure method. This makes use of Spring Framework’s Servlet 3.0 support and CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES) or the fully-qualified class name of a PropertyNamingStrategy subclass spring.jackson.deserialization.*= # see Jackson's DeserializationFeature spring.jackson.generator0 码力 | 269 页 | 1.43 MB | 1 年前3
 Spring Boot 1.3.0.M3 Reference Documentation toString(), containsString("World")); } } TestRestTemplate TestRestTemplate is a convenience subclass of Spring’s RestTemplate that is useful in integration tests. You can get a vanilla template or The first step in producing a deployable war file is to provide a SpringBootServletInitializer subclass and override its configure method. This makes use of Spring Framework’s Servlet 3.0 support and CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES) or the fully-qualified class name of a PropertyNamingStrategy subclass spring.jackson.deserialization.*= # see Jackson's DeserializationFeature spring.jackson.generator0 码力 | 277 页 | 1.47 MB | 1 年前3 Spring Boot 1.3.0.M3 Reference Documentation toString(), containsString("World")); } } TestRestTemplate TestRestTemplate is a convenience subclass of Spring’s RestTemplate that is useful in integration tests. You can get a vanilla template or The first step in producing a deployable war file is to provide a SpringBootServletInitializer subclass and override its configure method. This makes use of Spring Framework’s Servlet 3.0 support and CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES) or the fully-qualified class name of a PropertyNamingStrategy subclass spring.jackson.deserialization.*= # see Jackson's DeserializationFeature spring.jackson.generator0 码力 | 277 页 | 1.47 MB | 1 年前3
 Spring Boot 1.3.0.M5 Reference Documentation toString(), containsString("World")); } } TestRestTemplate TestRestTemplate is a convenience subclass of Spring’s RestTemplate that is useful in integration tests. You can get a vanilla template or The first step in producing a deployable war file is to provide a SpringBootServletInitializer subclass and override its configure method. This makes use of Spring Framework’s Servlet 3.0 support and CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES) or the fully-qualified class name of a PropertyNamingStrategy subclass spring.jackson.deserialization.*= # see Jackson's DeserializationFeature spring.jackson.generator0 码力 | 283 页 | 1.50 MB | 1 年前3 Spring Boot 1.3.0.M5 Reference Documentation toString(), containsString("World")); } } TestRestTemplate TestRestTemplate is a convenience subclass of Spring’s RestTemplate that is useful in integration tests. You can get a vanilla template or The first step in producing a deployable war file is to provide a SpringBootServletInitializer subclass and override its configure method. This makes use of Spring Framework’s Servlet 3.0 support and CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES) or the fully-qualified class name of a PropertyNamingStrategy subclass spring.jackson.deserialization.*= # see Jackson's DeserializationFeature spring.jackson.generator0 码力 | 283 页 | 1.50 MB | 1 年前3
 Spring Framework Reference Documentation 4.3.26.RELEASElibrary to generate dynamically a subclass that overrides the method. Note • For this dynamic subclassing to work, the class that the Spring bean container will subclass cannot be final, and the method overridden cannot be final either. • Unit-testing a class that has an abstract method requires you to subclass the class yourself and to supply a stub implementation of the abstract method. • Concrete methods in charge of creating the instance in that case and therefore cannot create a runtime-generated subclass on the fly. Spring Framework Reference Documentation 4.3.26.RELEASE Spring Framework 68 Looking0 码力 | 916 页 | 5.52 MB | 1 年前3 Spring Framework Reference Documentation 4.3.26.RELEASElibrary to generate dynamically a subclass that overrides the method. Note • For this dynamic subclassing to work, the class that the Spring bean container will subclass cannot be final, and the method overridden cannot be final either. • Unit-testing a class that has an abstract method requires you to subclass the class yourself and to supply a stub implementation of the abstract method. • Concrete methods in charge of creating the instance in that case and therefore cannot create a runtime-generated subclass on the fly. Spring Framework Reference Documentation 4.3.26.RELEASE Spring Framework 68 Looking0 码力 | 916 页 | 5.52 MB | 1 年前3
 Spring Framework Reference Documentation v4.3.2library to generate dynamically a subclass that overrides the method. Note • For this dynamic subclassing to work, the class that the Spring bean container will subclass cannot be final, and the method overridden cannot be final either. • Unit-testing a class that has an abstract method requires you to subclass the class yourself and to supply a stub implementation of the abstract method. • Concrete methods in charge of creating the instance in that case and therefore cannot create a runtime-generated subclass on the fly. Spring Framework Reference Documentation 4.3.2.RELEASE Spring Framework 65 • Finally0 码力 | 907 页 | 5.46 MB | 1 年前3 Spring Framework Reference Documentation v4.3.2library to generate dynamically a subclass that overrides the method. Note • For this dynamic subclassing to work, the class that the Spring bean container will subclass cannot be final, and the method overridden cannot be final either. • Unit-testing a class that has an abstract method requires you to subclass the class yourself and to supply a stub implementation of the abstract method. • Concrete methods in charge of creating the instance in that case and therefore cannot create a runtime-generated subclass on the fly. Spring Framework Reference Documentation 4.3.2.RELEASE Spring Framework 65 • Finally0 码力 | 907 页 | 5.46 MB | 1 年前3
共 777 条
- 1
- 2
- 3
- 4
- 5
- 6
- 78













