setPath

The setPath method of the Cookie class sets the path value for a Cookie object.

public void setPath(java.lang.String path);

Example

The following code sets the path for the CookCust cookie to /. This insures that the cookie is sent to all URLs for a given site.

CookCust.setPath("/");

© 1999 Microsoft Corporation. All rights reserved. Terms of use.