News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

HttpCookie GetPortlist() Example

Started by VelMurugan, Dec 24, 2008, 10:07 PM

Previous topic - Next topic

VelMurugan

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());
    }
}


Output of the program:-

Port list is: 8080

Source : codingdiary