美文网首页
1HttpServlet容器响应Web客户请求流程

1HttpServlet容器响应Web客户请求流程

作者: 未知的证明 | 来源:发表于2019-05-06 20:50 被阅读0次

HttpServlet容器响应Web客户请求流程如下:
1)Web客户向Servlet容器发出Http请求;
2)Servlet容器解析Web客户的Http请求;
3)Servlet容器创建一个HttpRequest对象,在这个对象中封装Http请求信息;
4)Servlet容器创建一个HttpResponse对象;
5)Servlet容器调用HttpServlet的service方法,这个方法中会根据request的Method来判断具体是执行doGet还是doPost,把HttpRequest和HttpResponse对象作为service方法的参数传给HttpServlet对象;
6)HttpServlet调用HttpRequest的有关方法,获取HTTP请求信息;
7)HttpServlet调用HttpResponse的有关方法,生成响应数据;
8)Servlet容器把HttpServlet的响应结果传给Web客户。
doGet() 或 doPost() 是创建HttpServlet时需要覆盖的方法.

相关文章

  • 1HttpServlet容器响应Web客户请求流程

    HttpServlet容器响应Web客户请求流程如下:1)Web客户向Servlet容器发出Http请求;2)Se...

  • 2018-12-01

    Httpservlet容器响应web客户请求流程如下: 1)Web刻画段向Servlet容器发出http请求 2)...

  • java基础面试题(一)

    1、servlet执行流程 客户端发出http请求,web服务器将请求转发到servlet容器,servlet容器...

  • 面试题集

    servlet执行流程 客户端发出http请求,web服务器将请求转发到servlet容器,servlet容器解析...

  • 面试题集

    servlet执行流程 客户端发出http请求,web服务器将请求转发到servlet容器,servlet容器解析...

  • java面试题.03

    1、servlet执行流程 客户端发出http请求,web服务器将请求转发到servlet容器,servlet容器...

  • 2018-01-03 java 面试 最新

    1、servlet执行流程 客户端发出http请求,web服务器将请求转发到servlet容器,servlet容器...

  • 2018年java技术面试题整理

    1、servlet执行流程 客户端发出http请求,web服务器将请求转发到servlet容器,servlet容器...

  • 2019年最新面试题

    1、servlet执行流程 客户端发出http请求,web服务器将请求转发到servlet容器,servlet容器...

  • Web容器

    容器? 请求与响应大致流程:

网友评论

      本文标题:1HttpServlet容器响应Web客户请求流程

      本文链接:https://www.haomeiwen.com/subject/myhjoqtx.html