亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cookie.java

?? 圖書管理系統(tǒng),用JSP實現(xiàn),圖書的查詢,添加等功能
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999 The Apache Software Foundation.  All rights 
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *    any, must include the following acknowlegement:  
 *       "This product includes software developed by the 
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowlegement may appear in the software itself,
 *    if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
 *    Foundation" must not be used to endorse or promote products derived
 *    from this software without prior written permission. For written 
 *    permission, please contact apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache"
 *    nor may "Apache" appear in their names without prior written
 *    permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 *
 * ====================================================================
 *
 * This source code implements specifications defined by the Java
 * Community Process. In order to remain compliant with the specification
 * DO NOT add / change / or delete method signatures!
 */ 

package javax.servlet.http;

import java.io.IOException;
import java.text.MessageFormat;
import java.util.ResourceBundle;

/**
 *
 * Creates a cookie, a small amount of information sent by a servlet to 
 * a Web browser, saved by the browser, and later sent back to the server.
 * A cookie's value can uniquely 
 * identify a client, so cookies are commonly used for session management.
 * 
 * <p>A cookie has a name, a single value, and optional attributes
 * such as a comment, path and domain qualifiers, a maximum age, and a
 * version number. Some Web browsers have bugs in how they handle the 
 * optional attributes, so use them sparingly to improve the interoperability 
 * of your servlets.
 *
 * <p>The servlet sends cookies to the browser by using the
 * {@link HttpServletResponse#addCookie} method, which adds
 * fields to HTTP response headers to send cookies to the 
 * browser, one at a time. The browser is expected to 
 * support 20 cookies for each Web server, 300 cookies total, and
 * may limit cookie size to 4 KB each.
 * 
 * <p>The browser returns cookies to the servlet by adding 
 * fields to HTTP request headers. Cookies can be retrieved
 * from a request by using the {@link HttpServletRequest#getCookies} method.
 * Several cookies might have the same name but different path attributes.
 * 
 * <p>Cookies affect the caching of the Web pages that use them. 
 * HTTP 1.0 does not cache pages that use cookies created with
 * this class. This class does not support the cache control
 * defined with HTTP 1.1.
 *
 * <p>This class supports both the Version 0 (by Netscape) and Version 1 
 * (by RFC 2109) cookie specifications. By default, cookies are
 * created using Version 0 to ensure the best interoperability.
 *
 *
 * @author	Various
 * @version	$Version$
 *
 */

// XXX would implement java.io.Serializable too, but can't do that
// so long as sun.servlet.* must run on older JDK 1.02 JVMs which
// don't include that support.

public class Cookie implements Cloneable {

    private static final String LSTRING_FILE =
	"javax.servlet.http.LocalStrings";
    private static ResourceBundle lStrings =
	ResourceBundle.getBundle(LSTRING_FILE);
    
    //
    // The value of the cookie itself.
    //
    
    private String name;	// NAME= ... "$Name" style is reserved
    private String value;	// value of NAME

    //
    // Attributes encoded in the header's cookie fields.
    //
    
    private String comment;	// ;Comment=VALUE ... describes cookie's use
				// ;Discard ... implied by maxAge < 0
    private String domain;	// ;Domain=VALUE ... domain that sees cookie
    private int maxAge = -1;	// ;Max-Age=VALUE ... cookies auto-expire
    private String path;	// ;Path=VALUE ... URLs that see the cookie
    private boolean secure;	// ;Secure ... e.g. use SSL
    private int version = 0;	// ;Version=1 ... means RFC 2109++ style
    
    

    /**
     * Constructs a cookie with a specified name and value.
     *
     * <p>The name must conform to RFC 2109. That means it can contain 
     * only ASCII alphanumeric characters and cannot contain commas, 
     * semicolons, or white space or begin with a $ character. The cookie's
     * name cannot be changed after creation.
     *
     * <p>The value can be anything the server chooses to send. Its
     * value is probably of interest only to the server. The cookie's
     * value can be changed after creation with the
     * <code>setValue</code> method.
     *
     * <p>By default, cookies are created according to the Netscape
     * cookie specification. The version can be changed with the 
     * <code>setVersion</code> method.
     *
     *
     * @param name 			a <code>String</code> specifying the name of the cookie
     *
     * @param value			a <code>String</code> specifying the value of the cookie
     *
     * @throws IllegalArgumentException	if the cookie name contains illegal characters
     *					(for example, a comma, space, or semicolon)
     *					or it is one of the tokens reserved for use
     *					by the cookie protocol
     * @see #setValue
     * @see #setVersion
     *
     */

    public Cookie(String name, String value) {
	if (!isToken(name)
		|| name.equalsIgnoreCase("Comment")	// rfc2019
		|| name.equalsIgnoreCase("Discard")	// 2019++
		|| name.equalsIgnoreCase("Domain")
		|| name.equalsIgnoreCase("Expires")	// (old cookies)
		|| name.equalsIgnoreCase("Max-Age")	// rfc2019
		|| name.equalsIgnoreCase("Path")
		|| name.equalsIgnoreCase("Secure")
		|| name.equalsIgnoreCase("Version")
	    ) {
	    String errMsg = lStrings.getString("err.cookie_name_is_token");
	    Object[] errArgs = new Object[1];
	    errArgs[0] = name;
	    errMsg = MessageFormat.format(errMsg, errArgs);
	    throw new IllegalArgumentException(errMsg);
	}

	this.name = name;
	this.value = value;
    }





    /**
     *
     * Specifies a comment that describes a cookie's purpose.
     * The comment is useful if the browser presents the cookie 
     * to the user. Comments
     * are not supported by Netscape Version 0 cookies.
     *
     * @param purpose		a <code>String</code> specifying the comment 
     *				to display to the user
     *
     * @see #getComment
     *
     */

    public void setComment(String purpose) {
	comment = purpose;
    }
    
    
    

    /**
     * Returns the comment describing the purpose of this cookie, or
     * <code>null</code> if the cookie has no comment.
     *
     * @return			a <code>String</code> containing the comment,
     *				or <code>null</code> if none
     *
     * @see #setComment
     *
     */ 

    public String getComment() {
	return comment;
    }
    
    
    


    /**
     *
     * Specifies the domain within which this cookie should be presented.
     *
     * <p>The form of the domain name is specified by RFC 2109. A domain
     * name begins with a dot (<code>.foo.com</code>) and means that
     * the cookie is visible to servers in a specified Domain Name System
     * (DNS) zone (for example, <code>www.foo.com</code>, but not 
     * <code>a.b.foo.com</code>). By default, cookies are only returned
     * to the server that sent them.
     *
     *
     * @param pattern		a <code>String</code> containing the domain name
     *				within which this cookie is visible;
     *				form is according to RFC 2109
     *
     * @see #getDomain
     *
     */

    public void setDomain(String pattern) {
	domain = pattern.toLowerCase();	// IE allegedly needs this
    }
    
    
    
    

    /**
     * Returns the domain name set for this cookie. The form of 
     * the domain name is set by RFC 2109.
     *
     * @return			a <code>String</code> containing the domain name
     *
     * @see #setDomain
     *
     */ 

    public String getDomain() {
	return domain;
    }




    /**
     * Sets the maximum age of the cookie in seconds.
     *
     * <p>A positive value indicates that the cookie will expire
     * after that many seconds have passed. Note that the value is
     * the <i>maximum</i> age when the cookie will expire, not the cookie's
     * current age.
     *
     * <p>A negative value means
     * that the cookie is not stored persistently and will be deleted
     * when the Web browser exits. A zero value causes the cookie

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美丰满一区二区免费视频| 久久99热国产| 色狠狠色狠狠综合| 亚洲免费色视频| 色噜噜狠狠色综合中国| 亚洲日本韩国一区| 欧美天天综合网| 秋霞成人午夜伦在线观看| 日韩午夜激情视频| 国产精品综合一区二区三区| 欧美国产一区二区在线观看| 91麻豆免费视频| 亚洲图片自拍偷拍| 日韩午夜在线观看| 成人在线一区二区三区| 综合久久给合久久狠狠狠97色| 91国偷自产一区二区三区成为亚洲经典| 亚洲一区二区在线免费看| 8v天堂国产在线一区二区| 麻豆精品在线视频| 中文成人av在线| 欧美日韩你懂得| 国产麻豆视频精品| 亚洲欧洲日产国码二区| 欧美日韩第一区日日骚| 九色综合狠狠综合久久| 国产精品电影一区二区三区| 欧美亚洲另类激情小说| 老司机免费视频一区二区三区| 国产欧美日韩亚州综合| 在线观看成人小视频| 国产在线不卡一区| 亚洲精品国久久99热| 欧美xxxx老人做受| 日韩一区欧美一区| 欧美人伦禁忌dvd放荡欲情| 国产精品亚洲成人| 香蕉加勒比综合久久| 国产夜色精品一区二区av| 色综合久久88色综合天天6| 久久精品理论片| 亚洲影院在线观看| 欧美经典一区二区| 欧美一区二区啪啪| 色综合久久88色综合天天| 久久国产综合精品| 亚洲电影一区二区| 国产精品日日摸夜夜摸av| 欧美一级久久久久久久大片| 99综合电影在线视频| 激情综合亚洲精品| 午夜在线成人av| 亚洲视频狠狠干| 国产亚洲一区字幕| 91精品久久久久久久91蜜桃| 91丝袜高跟美女视频| 国产成人亚洲综合a∨婷婷| 日韩电影在线一区二区| 亚洲欧洲制服丝袜| 国产精品福利一区| 久久久蜜桃精品| 日韩三区在线观看| 91精品免费观看| 亚洲欧美日本韩国| 国产欧美在线观看一区| 欧美不卡视频一区| 欧美一区二区黄色| 欧美日韩一本到| 欧美午夜精品久久久久久孕妇| av资源站一区| 白白色亚洲国产精品| 粉嫩嫩av羞羞动漫久久久 | 亚洲国产综合色| 17c精品麻豆一区二区免费| 久久久久久**毛片大全| 精品少妇一区二区三区在线视频 | 欧美日韩中文一区| 91麻豆精品在线观看| 99国产精品久| 91在线你懂得| 91福利国产成人精品照片| 91黄色小视频| 欧美另类变人与禽xxxxx| 欧美日韩精品一区二区三区四区| 日本道在线观看一区二区| 91欧美激情一区二区三区成人| 99久久精品免费看国产免费软件| 成人美女在线视频| proumb性欧美在线观看| 色婷婷精品久久二区二区蜜臂av | 成人免费黄色在线| 成人黄色一级视频| av激情综合网| 色播五月激情综合网| 欧美性大战xxxxx久久久| 欧美在线观看视频在线| 欧美日韩精品三区| 日韩欧美亚洲一区二区| 久久久久久电影| 国产精品白丝在线| 亚洲成人精品影院| 久久国产精品露脸对白| 欧美v亚洲v综合ⅴ国产v| 久久婷婷综合激情| 中文字幕在线免费不卡| 亚洲一二三级电影| 久久99久久久久久久久久久| 国产成人在线视频播放| 一本大道久久精品懂色aⅴ| 欧美日韩在线一区二区| 欧美一区二区播放| 国产亚洲精品久| 一区二区三区日韩精品| 日韩av电影一区| 国产黑丝在线一区二区三区| 91黄色小视频| 精品国产麻豆免费人成网站| 亚洲国产电影在线观看| 五月天亚洲精品| 国产综合成人久久大片91| 91视频国产资源| 欧美一级xxx| 亚洲天堂a在线| 激情六月婷婷综合| 色婷婷亚洲一区二区三区| 欧美岛国在线观看| 亚洲综合免费观看高清完整版在线| 久久国产欧美日韩精品| 91黄视频在线观看| 久久久久青草大香线综合精品| 亚洲女同女同女同女同女同69| 日本欧美大码aⅴ在线播放| 成人免费av网站| 精品国产髙清在线看国产毛片| 综合婷婷亚洲小说| 国内精品自线一区二区三区视频| 在线观看一区二区精品视频| 久久先锋影音av鲁色资源网| 午夜一区二区三区视频| 国产91露脸合集magnet| 欧美一区二区黄| 亚洲一区二区三区在线看 | 国产成人av一区二区三区在线 | 欧美草草影院在线视频| 亚洲精品亚洲人成人网在线播放| 国产一区二区伦理| 欧美一卡二卡在线| 久久国产精品露脸对白| 中文字幕av一区二区三区| 国产精品久久久久国产精品日日| 天堂在线亚洲视频| 亚洲人成网站色在线观看| 国精产品一区一区三区mba视频| 欧美日韩国产首页| 亚洲美女区一区| 成人激情免费视频| 国产视频一区二区三区在线观看| 麻豆精品一区二区综合av| 在线播放91灌醉迷j高跟美女 | 国产精品久久久久婷婷| 极品瑜伽女神91| 日韩精品一区二区三区视频在线观看| 五月婷婷激情综合| 欧美日韩在线亚洲一区蜜芽| 亚洲综合一区在线| 91福利资源站| 亚洲猫色日本管| 一本久久精品一区二区| 中文字幕佐山爱一区二区免费| 成人国产精品视频| 国产精品久久久久aaaa樱花| jlzzjlzz国产精品久久| 中文字幕亚洲一区二区va在线| 国产成a人亚洲| 国产精品久久久久久久第一福利| 成人午夜视频在线| 国产精品久久看| 91亚洲男人天堂| 亚洲黄色在线视频| 91国模大尺度私拍在线视频| 一区二区在线电影| 欧美日韩一区高清| 五月婷婷久久丁香| 日韩一级完整毛片| 韩国一区二区三区| 中文无字幕一区二区三区| 成人av电影在线网| 一区二区三区欧美久久| 欧美日韩国产a| 久久成人18免费观看| 久久精品视频一区| av电影在线观看一区| 91色porny| 午夜精品一区二区三区三上悠亚| 91精品国产91热久久久做人人| 久久精品国产99| 中文字幕亚洲精品在线观看| 欧美性极品少妇| 免费在线观看视频一区| 国产清纯白嫩初高生在线观看91 |