archieve: homework5 cookie.jsp

This commit is contained in:
2025-04-21 14:05:06 +08:00
parent 3bed589aab
commit c910a8a287
+15
View File
@@ -0,0 +1,15 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
</head>
<body>
Cookie对象的信息:<br/>
${cookie.userName} <br/>
Cookie对象的名称和值:<br/>
${cookie.userName.name}=${cookie.userName.value} <br/>
<%
response.addCookie(new Cookie("userName", "msksbr"));
%>
</body>
</html>