2009/3/29 Murat Yücel <kodeperke...@gmail.com> > Hi Peter > > I was creating cookie objects almost in the same way. I was just missing > the > context path part. I have added it, but still no change. > > When i am retrieving the cookie from my BasePage then i get nothing: > ((WebRequestCycle) > RequestCycle.get()).getWebRequest().getCookie("cookieName"); > > I have changed the logic so i iterate through a list of cookies just like > you do in jtrac. That didnt work either. > > Then i moved the logic from the basepage to an IAuthorizationStrategy but > still no luck. > > It is very strange. I guess the only difference right now is that i am > using > wicket-1.4-rc2
Okay, you found the IAuthorizationStrategy code I meant to link to that also last time. I must say I had some trouble with getting all this to work, there used to be a few outstanding bugs on the app. But I find it hard to believe that you can't find the cookie even when iterating over all available for given request. Maybe it is best you create a quickstart and open a JIRA. Another tip is you could use a FireFox plugin such as HttpFox [ https://addons.mozilla.org/en-US/firefox/addon/6647 ] to see what cookies are being sent as well as received. > /Murat > > 2009/3/29 Peter Thomas <ptrtho...@gmail.com> > > > 2009/3/28 Murat Yücel <kodeperke...@gmail.com> > > > > > Hi Peter > > > > > > Thanks for the response. The context path "hack" works when logging > out. > > > But > > > i still have a problem when i want to auto login. > > > > > > I log in with an user. Then the cookie is saved. I close the browser. > And > > > then i open a new browser, enter the url and expects that the user is > > auto > > > login. But when i am trying to to retrieve the cookie from the request > > then > > > i get null. The funny thing is that the textfields for username and > > > password > > > are filled out so the cookie exist. I am just not able to retrieve it. > > > > > > Here is the code I use for creating an auto-login cookie, maybe it will > > help: (line #131 onwards) > > > > > > > http://fisheye3.atlassian.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/LoginPage.java?r=1231#l131 > > > > > > > > > > > > > /Murat > > > > > > 2009/3/28 Peter Thomas <ptrtho...@gmail.com> > > > > > > > 2009/3/28 Murat Yücel <kodeperke...@gmail.com> > > > > > > > > > Hi Guys do you need more information regarding this issue or should > i > > > > > create > > > > > a small quickstart application? I cant really figure out why i am > > > > > experiencing this error... > > > > > > > > > > /Murat > > > > > > > > > > 2009/3/9 Murat Yücel <kodeperke...@gmail.com> > > > > > > > > > > > Hi All > > > > > > > > > > > > I am experiencing a similar problem, as this jira issue: > > > > > > https://issues.apache.org/jira/browse/WICKET-2011 > > > > > > > > > > > > I am trying to make auto login work. When you login and check the > > > > > remember > > > > > > box then a > > > > > > cookie is persisted. Whenever i logout the cookie is removed by > > > calling > > > > > the > > > > > > clear method on > > > > > > the request. The problem is that the cookie is not cleared on > > logout > > > > when > > > > > > having a context path. > > > > > > I am still seing the cookie value but that should have been > > cleared. > > > > > > > > > > > > > > > > > > > I create a new cookie with the same name but no data to overwrite > the > > > old > > > > one (line #108 onwards), works for me. Can't remember now how I > > arrived > > > at > > > > this, there may be a better way. > > > > > > > > > > > > > > > > > > http://fisheye3.atlassian.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/HeaderPanel.java?r=1288#l108 > > > > > > > > > > > > > > Similar the cookie should not die when the cookie die, but > somehow > > > the > > > > > > cookie age is set to > > > > > > max age -1 when i open a new session. > > > > > > > > > > > > Hopefully someone can help me. > > > > > > > > > > > > /Murat > > > > > > > > > > > > > > > > > > > > >