HttpCookie GetPortlist() Example
Return the port list attribute of the cookie
HttpCookieclass GetPortlist() method example. This example shows you how to use GetPortlist() method.This method Return the port list attribute of the cookie
Here is the code:-
/*
* @Program that Return the port list attribute of the cookie
* GetPortlist.java
* Author:-RoseIndia Team
* Date:-25-Jun-2008
*/
import java.net.*;
public class GetPortlist {
public static void main(String[] args) throws Exception {
String name = "Roseindia";
String value = "ABC";
HttpCookie hc = new HttpCookie(name, value);
hc.setPortlist("8080");
//Return the port list attribute of the cookie
System.out.println("Port list is: "+hc.getPortlist());
}
} |
|