Author: jfrederic.clere(a)jboss.com
Date: 2009-06-11 09:57:24 -0400 (Thu, 11 Jun 2009)
New Revision: 1107
Modified:
sandbox/webapps/src/MyCookies.java
Log:
Add a cookie with comment :-)
Modified: sandbox/webapps/src/MyCookies.java
===================================================================
--- sandbox/webapps/src/MyCookies.java 2009-06-11 12:30:07 UTC (rev 1106)
+++ sandbox/webapps/src/MyCookies.java 2009-06-11 13:57:24 UTC (rev 1107)
@@ -108,9 +108,16 @@
/* create the cookies */
for (int i=0; i<mytest.length; i++) {
- Cookie cookie = CreateCookie(mytest[i]);
- response.addCookie(cookie);
+ try {
+ Cookie cookie = CreateCookie(mytest[i]);
+ response.addCookie(cookie);
+ } catch (Exception ex) {
+ out.println("Cookie test: " + i + " Failed");
+ }
}
+ Cookie cookie = new Cookie("commented", "commented cookie");
+ cookie.setComment("This is a comment");
+ response.addCookie(cookie);
out.println("<P>");
Show replies by date