If URL' file name changes from page to page then CookieManager will not add SOME cookies to the Response. E.g. : page 1: http://www.a.com/servlets/XXX/page1 page 2: http://www.a.com/servlets/YYY/page2 cookies in with cookie.getPath() containing XXX will not be added to Response for page2. This is b/c CookieManager has a condition in getCookieHeaderForURL(URL url) method: url.getFile().startsWith(cookie.getPath()) I don't know if this is your problem, but I had this issue in my test scenarios where user was hopping from servlet to servlet and was losing his session. My request had 2 cookies: one from JServ, its path was simply "/" and there was no problem with it, but the other was an app server's cookie that had it's path set to "/servlet/XXX". Therefore CookieManager was comparing url.getFile()=/servlet/YYY and cookie.getPath()=/servlet/XXX and since they don't match it was dropping the cookie (unfortunately it was the last cookie that maintained the session). I ended up commenting-out that condition and everything worked well. Good luck, Dmitri
On Fri, 11 Jan 2002, Alex Colic wrote: > If you figure out how to do this please forward the info to me. I am trying > to do the same thing and I have been unsuccessful. > > Alex > > -----Original Message----- > From: Roland Chan [mailto:[EMAIL PROTECTED]] > Sent: January 11, 2002 3:47 PM > To: 'JMeter Users List' > Subject: Cookie Manager & Struts? > > > Not 100% on how to correctly use the cookie manager, could someone > please give an example of how to use this correctly. > > I have a struts application for which I created a thread group, added > the cookie manager, and web test samples all beneath a simple > controller. The test simulates a login, and then one other business > action. The login works fine (1st struts action -- in which case I am > assuming the cookie manager correctly used the JSESSIONID), however, > when it tries to proceed with the next business action (2nd struts > action) it no longer has any knowledge of the current session and I > receive an IO Exception. > > Does anyone else experience this sort of behavior. Any advice would be > appreciated. > > Regards, > Roland > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>