From: <ddk...@ki...> - 2004-07-22 13:34:09
|
Are you "clicking" on links and buttons from the returned HtmlPage object, or are you creating a new HtmlPage object for ever web page (URL) that you want to load? If you are creating a new HtmlPage object each time, it would match the behavior you're describing. What you want to do is "click" on the links or buttons on the returned HtmlPage object to keep everything in the same login session. I use htmlunit at work with a form-based login, and it has no problem storing cookies in that context. (I'm using a patched htmlunit-1.3-pre1 at work, although none of the patches are related to cookies.) Dave On Thu, Jul 22, 2004 at 01:51:56PM +0200, Thorsten Suckow-Homberg wrote: > ok, here is what it does: > > When u fill out the login-form the form posts to the same site - it > then checks if the login was valid (looks into db etc.) and if so, a > user-object will be created (phpLib) and stored into the session. > Then a redirect to the appliction-start-page begins - and the session > is lost. > > I have taken a look on the server into the session- directory, and it > looks like the session is created new everytime HtmlUnit loads a > page... > > Anyone encounters similiar problems? > > Regards > > Thorsten |