瑞鲁手机APP下载网_专注推荐好用的手机APP和游戏APP

Java技巧:关于Cookie的操作 jsp实现cookie的使用

jsp源码实例5(cookie)

人气:0引自:瑞鲁手机APP

package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Sets six cookies: three that apply only to the current * session (regardless of how long that session lasts) * and three that persist for an hour (regardless of * whether the browser is restarted). *

* Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * © 2000 Marty Hall; may be freely used or adapted. */ public class SetCookies extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { for(int i=0; i

专题文集:JSP实例 windows
引用标题:《Java技巧:关于Cookie的操作 jsp实现cookie的使用》
来源地址:https://www.sdruilu.cn/index.php/news/tpart-29109.html