archieve: homework5 cookie.jsp
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user