Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 5.1.0sp9 API Reference

## weblogic.html
Class Cookie

    java.lang.Object
      |
      +--weblogic.html.Cookie

Deprecated. Use javax.servlet.http.Cookie

public class Cookie
extends java.lang.Object

This class has been deprecated. Use javax.servlet.http.Cookie.

The Internic RFC is available at http://www.internic.net/rfc/rfc2109.txt. A description of Netscape's implementation is available at http://home.netscape.com/newsref/std/cookie_spec.html.

Author:
  Copyright (c) 1996-98 by WebLogic, Inc. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
`Cookie(java.lang.String cookiestring)` Deprecated. Constructs a Cookie from a semicolon-delimited String, composed after the pattern "name;value".
`Cookie(java.lang.String[] namevalue)` Deprecated. Constructs a Cookie from the specified array of Strings, composed after the pattern "name=value".
`Cookie(java.lang.String[] properties, long expiration, java.lang.String path, java.lang.String domain, boolean secure)` Deprecated. Constructs a Cookie from the specified array of Strings, composed after the pattern "name=value", the date of the expiration, the path, the domain, and a boolean that sets whether the Cookie is secure.
`Cookie(java.lang.String name, java.lang.String value)` Deprecated. Constructs a Cookie.

Method Summary
`java.lang.String[]` | `getCookieNames()` Deprecated. Returns the name/value pairs of a Cookie as an array of Strings.
`java.lang.String` | `getValue(java.lang.String val)` Deprecated. Gets the values for a Cookie property name.
`java.lang.String` | `getValues(java.lang.String val)` Deprecated. For backwards compatibility.
`void` | `setDomain(java.lang.String domain)` Deprecated. Sets the domain of a Cookie.
`void` | `setExpires(long expiration)` Deprecated. Sets the expiration of a Cookie.
`void` | `setMaxAge(int i)` Deprecated. Sets the expiration to the specified number of seconds.
`void` | `setPath(java.lang.String path)` Deprecated. Sets the path of a Cookie.
`void` | `setSecure(boolean flag)` Deprecated. Determines whether the Cookie is secure.
`java.lang.String` | `toString()` Deprecated. Returns a String representation of a Cookie.
`static java.lang.String` | `toString(Cookie[] cookie)` Deprecated. Returns a String representation of any number of Cookies' ingredients.
`void` | `write(java.io.PrintStream ps)` Deprecated. Writes a Cookie to the specified printstream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Cookie

    public Cookie(java.lang.String name,
                  java.lang.String value)

  Deprecated.
  Constructs a Cookie.

  Parameters:
    `name` - Name of Cookie
    `value` - Value of Cookie

### Cookie

    public Cookie(java.lang.String[] namevalue)

  Deprecated.
  Constructs a Cookie from the specified array of Strings, composed after the pattern "name=value".

  Parameters:
    `namevalues` - Array of Strings

### Cookie

    public Cookie(java.lang.String[] properties,
                  long expiration,
                  java.lang.String path,
                  java.lang.String domain,
                  boolean secure)

  Deprecated.
  Constructs a Cookie from the specified array of Strings, composed after the pattern "name=value", the date of the expiration, the path, the domain, and a boolean that sets whether the Cookie is secure.

  Parameters:
    `properties` - Array of name/value pairs
    `expiration` - When the Cookie expires
    `path` - Path name of Cookie
    `domain` - Domain name of Cookie
    `secure` - True is Cookie should be secure

### Cookie

    public Cookie(java.lang.String cookiestring)

  Deprecated.
  Constructs a Cookie from a semicolon-delimited String, composed after the pattern "name;value".

  Parameters:
    `cookiestring` - Name;value pair

Method Detail

### getCookieNames

    public java.lang.String[] getCookieNames()

  Deprecated.
  Returns the name/value pairs of a Cookie as an array of Strings.

  Returns:
    Cookie name/value pairs

### setExpires

    public void setExpires(long expiration)

  Deprecated.
  Sets the expiration of a Cookie.

  Parameters:
    `expiration` - Date when the cookie should expire

### setMaxAge

    public void setMaxAge(int i)

  Deprecated.
  Sets the expiration to the specified number of seconds. Use the argument "-1" to set the max age of a Cookie to a year.

  Parameters:
    `i` - Number of seconds a Cookie should live

### setPath

    public void setPath(java.lang.String path)

  Deprecated.
  Sets the path of a Cookie.

  Parameters:
    `path` - Path name

### setDomain

    public void setDomain(java.lang.String domain)

  Deprecated.
  Sets the domain of a Cookie.

  Parameters:
    `domain` - Domain name

### setSecure

    public void setSecure(boolean flag)

  Deprecated.
  Determines whether the Cookie is secure.

  Parameters:
    `flag` - True if Cookie should be secure

### write

    public void write(java.io.PrintStream ps)
               throws java.io.IOException

  Deprecated.
  Writes a Cookie to the specified printstream.

  Parameters:
    `ps` - PrintStream
  Throws:
    java.io.IOException - if there is an error

### toString

    public java.lang.String toString()

  Deprecated.
  Returns a String representation of a Cookie.

  Returns:
    String
  Overrides:
    toString in class java.lang.Object

### getValue

    public java.lang.String getValue(java.lang.String val)

  Deprecated.
  Gets the values for a Cookie property name.

  Parameters:
    `val` - Name of a property
  Returns:
    Comma-delimited list of its values

### getValues

    public java.lang.String getValues(java.lang.String val)

  Deprecated.
  For backwards compatibility. Prefer .getValue().

### toString

    public static java.lang.String toString(Cookie[] cookie)

  Deprecated.
  Returns a String representation of any number of Cookies' ingredients.

  Parameters:
    `cookie` - Cookies
  Returns:
    List of what's in the Cookies

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://www.weblogic.com/docs51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD