Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
8.4 Examples of Setting and Reading Cookies
189
Listing 8.2 ShowCookies.java (continued)
                "\n" +
                "
\n" +
                "  
\n" +
                  "  
Cookie Name\n" +
                "  
Cookie Value");
    Cookie[] cookies = request.getCookies();
    Cookie cookie;
    for(int i=0; i
      cookie = cookies[i];
      out.println("
" + cookie.getName() + "\n" +
                  "  
" + cookie.getValue());
    }
    out.println("
");
  }
}
Figure 8 2
Result of visiting the ShowCookies servlet within an hour of visiting 
SetCookies in the same browser session.
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved