Servlet响应Web客户端请求流程

  1. Web客户端向Servlet容器发出http请求。
  2. Servlet容器解析Web客户端的http请求。
  3. Servlet容器创建HttpRequest对象,以封装http请求信息。
  4. Servlet容器创建HttpResponse对象,以封装http响应信息。
  5. Servlet容器调用HttpServlet对象的service方法,把HttpRequest、HttpResponse对象做为参数。
  6. HttpServlet调用HttpRequest方法,取得http请求信息。
  7. HttpServlet调用HttpResponse方法,生成http响应信息。
  8. Servlet容器把HttpServlet生成的响应信息传给Web客户端。

猜你喜欢

转载自hylxsfh.iteye.com/blog/1725617
今日推荐