Interview Questions

How do I ensure each http request for jsp is within one jsessionid ?

Apache JMeter FAQ


(Continued from previous question...)

How do I ensure each http request for jsp is within one jsessionid ?

Just insert an HTTP Cookie Manager. This keeps track of all cookies for each thread within the thread group. Without http cookie manager, each request is a new session as cookies are not kept. jsessionid is only shown for the very first request, subsequent request will not see the jsessionid. to use a variable in jmeter is ${name of variable}.

This is very useful when dealing with jsp form logins, as the first request is to login to the system and subsequent request is to do load testing on the target page. This will prevent redirection back into login page.

(Continued on next question...)

Other Interview Questions