I also have the problem to set a so called "session cookie" with tapestry.

org.apache.tapestry5.services.Cookies Interface is missing (among others)
this method:

public void writeCookieValue(String name, String value, String path, int
maxAge)

So if you want to write a Cookie with a custom path and also a custom maxAge
you can't. The workaround that I used so far is 

public void writeCookieValue(String name, String value, String path)

and set the maxAge global via AppModule:

configuration.add(SymbolConstants.COOKIE_MAX_AGE, "7200000");


But now I want to switch from the persistent cookie to a session cookie, so
I changed the line to:
configuration.add(SymbolConstants.COOKIE_MAX_AGE, "-1");

which results in this exception:

Exception constructing service 'Cookies': Coercion of -1 to type
org.apache.tapestry5.ioc.util.TimeInterval (via String -->
org.apache.tapestry5.ioc.util.TimeInterval) failed: Unexpected string '-'
(in time interval '-1').

What other options do I have?

Thx
Tim






--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-clear-cookie-when-browser-closes-tp3380592p5717232.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to