创建一个waven web 工程
装依赖
配置tomcat
一个 request 对象
浏览器 向 servlet(请求 request 对象)
servlet (把 request 对象)给 jsp 渲染
jsp 再 (把request 对象) 返回给浏览器
每次刷新都是不同 request 对象
头文件得改
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<welcome-file-list>
<welcome-file>Home.jsp</welcome-file>
</welcome-file-list>
</web-app>
Servlet01
test01 这个是 request
刷新页面都是1,每次返回不一样
把 request 换成 session 在一个浏览器
application
可以在不同的客户端