1、web客户向Servlet容器发出Http请求;
2,、Servlet容器解析Web客户的Http请求;
3、Servlet容器创建一个HttpRequest对象,封装Http请求信息;
4、Servlet容器创建一个HttpResponse对象;
5、Servlet容器调用HttpServlet的service方法,把刚才创建的两个对象作为service方法的参数传给HttpServlet对象;
6、HttpServlet调用HttpRequest的有关方法,获取Http请求信息;
7、HttpServlet调用HttpResponse的有关方法,生成响应数据;
8、Servlet容器把HttpServlet的响应结果传给Web客户。
服务器响应web客户请求的流程
最新推荐文章于 2021-08-09 10:54:23 发布