Share via


HttpCookie.Path Property

Definition

Returns the path on the server to which the browser returns this cookie. -or- Specifies a path for the cookie to which the client should return the cookie.

public string? Path { [Android.Runtime.Register("getPath", "()Ljava/lang/String;", "")] get; [Android.Runtime.Register("setPath", "(Ljava/lang/String;)V", "")] set; }
[<get: Android.Runtime.Register("getPath", "()Ljava/lang/String;", "")>]
[<set: Android.Runtime.Register("setPath", "(Ljava/lang/String;)V", "")>]
member this.Path : string with get, set

Property Value

a String specifying a path that contains a servlet name, for example, /catalog

Attributes

Remarks

Property getter documentation:

Returns the path on the server to which the browser returns this cookie. The cookie is visible to all subpaths on the server.

Java documentation for java.net.HttpCookie.getPath().

Property setter documentation:

Specifies a path for the cookie to which the client should return the cookie.

The cookie is visible to all the pages in the directory you specify, and all the pages in that directory's subdirectories. A cookie's path must include the servlet that set the cookie, for example, /catalog, which makes the cookie visible to all directories on the server under /catalog.

Consult RFC 2965 (available on the Internet) for more information on setting path names for cookies.

Java documentation for java.net.HttpCookie.setPath(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to