HttpCookie GetCommentURL() Example

Returns the comment url describing the purpose of this cookie


HttpCookieclass GetCommentURL() method example. This example shows you how to use GetCommentURL() method.This method Returns the comment url describing the purpose of this cookie, or null if the cookie has no comment url.

Here is the code:-
/* 
 * @Program that  Returns the comment url describing the purpose of this cookie,
 * GetCommentURL.java 
 * Author:-RoseIndia Team
 * Date:-25-Jun-2008
 */

import java.net.*;

public class GetCommentURL {
 public static void main(String[] argsthrows Exception {
        String name = "Name";
        String value = "ABC";
        HttpCookie hc = new HttpCookie(name, value);
        hc.setCommentURL("http://localhost:8084/ServletRequest/GetInputStream");
        // Returns the comment url describing the purpose of this cookie
       System.out.println("The comment url is :"+hc.getCommentURL());
    }
}

Output of the program:-
 The comment url is :http://localhost:8084/ServletRequest/GetInputStream

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US