Hi all, I want to add some further details concerning my problems with the Http Cookie Manager.
I did some testing with jmeter and with the tomcat session example that comes with the software (SessionExample.java). I'm using Tomcat 4.0.3 in "standalone" mode. First I tested with two http requests only (please look at NoCookieManager.jmx). As expected I got the following output: cookie = JSESSIONID=7EA7ABC2418EE7EC530B3FB4613A0280 Sampling url: http://localhost:9002/examples/servlet/SessionExample Header 1: Content-Type: text/html Header 2: Date: Mon, 08 Jul 2002 10:20:47 GMT Header 3: Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) Header 4: Connection: close Header 5: Set-Cookie: JSESSIONID=6FFEF08B5A291C9010705B2F1FE3D8A8;Path=/examples cookie = JSESSIONID=6FFEF08B5A291C9010705B2F1FE3D8A8 Sampling url: http://localhost:9002/examples/servlet/SessionExample Header 1: Content-Type: text/html Header 2: Date: Mon, 08 Jul 2002 10:20:47 GMT Header 3: Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) Header 4: Connection: close Header 5: Set-Cookie: JSESSIONID=0EA73A6A409B837B61754D2D3DA510E5;Path=/examples cookie = JSESSIONID=0EA73A6A409B837B61754D2D3DA510E5 Then I tested with two http requests and a Cookie Manager (CookieManager.jmx attached): I got the following output: Sampling url: http://localhost:9002/examples/servlet/SessionExample Header 1: Content-Type: text/html Header 2: Date: Mon, 08 Jul 2002 10:27:27 GMT Header 3: Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) Header 4: Connection: close Header 5: Set-Cookie: JSESSIONID=99F0F0DD074F580791F7128629A042FB;Path=/examples cookie = JSESSIONID=99F0F0DD074F580791F7128629A042FB Sampling url: http://localhost:9002/examples/servlet/SessionExample Header 1: Content-Type: text/html Header 2: Date: Mon, 08 Jul 2002 10:27:27 GMT Header 3: Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) Header 4: Connection: close cookie = null To get the output above I added some lines in HttpSampler.java but I didn't make any functional changes. My question is: Why is the cookie "null" when requesting SessionExample the second time when using the Cookie Manager? I had expected to get the same Cookie value that I got for the first request. Thanks for your help, G�nter -----Urspr�ngliche Nachricht----- Von: Pretterhofer, Guenter (ext.) [mailto:[EMAIL PROTECTED]] Gesendet am: Freitag, 5. Juli 2002 15:01 An: [EMAIL PROTECTED] Betreff: Http Cookie Manager Hi all, hope all is well! Maybe somebody can help me with the following problem? In a thread group I defined a Http Cookie Manager and 2 Http Requests. In each Http Request I call a servlet that gives me back a Cookie in the Set-Cookie field in the http header. I logged the Set-Cookie values that I get back from the server after every Http Request. For this purpose I logged the cookie value in readResponse() in HttpSampler.java (conn.getHeaderField() ...). I had hoped that the Set-Cookie value (JSESSIONID=...) would be the same in both responses. When I'm doing the same in the browser by calling the servlets via a 2 HTML forms everything is fine. Is there a possibility to ensure that I'm in the same Http session for 2 or more Http Requests in Jmeter? Thanks for your help! G�nter -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
CookieManager.jmx
Description: Binary data
NoCookieManager.jmx
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

