Servlet&Http
2021-01-24 20:14
标签:x64 safari origin ike demo1 cse gen type lang 1、三个方法 1.1 init :只执行一次 1.2 service :每次都执行 1.3 destory: 关闭时执行一次 XML:配置 注解配置: @WebServlet({"/d4","/dd4","/ddd4"}) 另 实现httpservlet 需要实现两个方法:doGet/doPost servlet接口 ------->GenericServlet抽象类--------->HttpServlet抽象类 2、http协议 请求行 :请求方式 请求URL 协议版本 http/1.1 请求头: GET /logstores/csdn-pc-tracking-pageview/track_ua.gif? 请i求空行 请求体 :封装POST请求消息的请求参数 Servlet&Http 标签:x64 safari origin ike demo1 cse gen type lang 原文地址:https://www.cnblogs.com/mocc/p/13252541.html
@WebServlet("/user/demo4")
@WebServlet("/user/*")
@WebServlet("/*")
@WebServlet("*.do")
Host: event.csdn.net
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Content-Type: text/plain;charset=UTF-8
Origin: https://blog.csdn.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://blog.csdn.net/qq_33642117/article/details/51850417
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8