?? usercookie.jsp
字號:
<%@ page language="java" pageEncoding="GB2312" %><!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en"><html><head><title>Lomboz JSP</title></head><body bgcolor="#FFFFFF">
<%
Cookie[] cookies = request.getCookies();
String username=null,lovelyProduct=null;
if(cookies!=null){
for(int i = 0; i < cookies.length; i++)
{
if(cookies[i].getName().equals("lovelyProduct")){
lovelyProduct= cookies[i].getValue();}
else if(cookies[i].getName().equals("userName")){
username= cookies[i].getValue();}
}
out.println("user "+username +"love "+lovelyProduct);
}
%>
</body></html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -