Hi,

   I have a tml page called portfolio.tml and in corresponding java
portfollio page I have written this following to save the values in cookies

public class Portfolio {

@org.apache.tapestry5.ioc.annotations.Inject
private Cookies cookies;

public Portfolio() {
                cookies.writeCookieValue("isUserLogin", "True");
                cookies.writeCookieValue("userId", uId);
         }

}

With this cookies set value I have used this userid and isuserlogin in other
pages to check whether the user is logged in or not and to pass this saved
userid to other transactions like below

if(null != cookies.readCookieValue("userId")) {
          // processing
}

Most of the times the values are not get saved in cookies part in my browser
(I checked under cookies in browser), this cookies.readCookieValue("userId")
returns null value, but sometimes this returns expected value (Values are
there under cookies in ma browser) and working fine.

I don't know where am making mistake in the code, Can anyone point me in the
right direction? 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Issues-in-saving-values-in-cookies-tp5537459p5537459.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