[jboss-cvs] jboss-seam/src/main/org/jboss/seam/faces ...
Shane Bryzak
sbryzak at redhat.com
Tue Jun 19 23:24:06 EDT 2007
User: sbryzak2
Date: 07/06/19 23:24:06
Modified: src/main/org/jboss/seam/faces Selector.java
Log:
JBSEAM-1445
Revision Changes Path
1.3 +13 -0 jboss-seam/src/main/org/jboss/seam/faces/Selector.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Selector.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/faces/Selector.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Selector.java 19 Jun 2007 19:41:44 -0000 1.2
+++ Selector.java 20 Jun 2007 03:24:06 -0000 1.3
@@ -17,6 +17,7 @@
{
private boolean cookieEnabled;
private int cookieMaxAge = 31536000; //1 year
+ private String cookiePath= "/";
/**
* Is the cookie enabled?
@@ -44,6 +45,16 @@
this.cookieMaxAge = cookieMaxAge;
}
+ public String getCookiePath()
+ {
+ return cookiePath;
+ }
+
+ public void setCookiePath(String cookiePath)
+ {
+ this.cookiePath = cookiePath;
+ }
+
/**
* Override to define the cookie name
*/
@@ -85,6 +96,7 @@
{
HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
cookie.setValue(null);
+ cookie.setPath("/");
cookie.setMaxAge(0);
response.addCookie(cookie);
}
@@ -102,6 +114,7 @@
HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext().getResponse();
Cookie cookie = new Cookie( getCookieName(), value );
cookie.setMaxAge( getCookieMaxAge() );
+ cookie.setPath(cookiePath);
response.addCookie(cookie);
}
}
More information about the jboss-cvs-commits
mailing list