You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Braulio <br...@gmail.com> on 2009/08/07 19:45:56 UTC

How do you pass a JSESSIONID to other requests after Login?

Hi All,

I'm running into an issue with JMeter in that I can't pass the JSESSIONID to
other requests in the same Thread Group in my JMeter script.

The script is very simple (all in one thread group):
1. Send HTTP request to go to Login page
>> Regular Expression Extractor to get JSESSIONID and store in variable
2. Send HTTP request to Login to site (POST)
3. Send HTTP request to Logout (POST)

The problem is that even though I'm extracting the JSESSIONID (I think I'm
doing it right) it doesn't seem to pass it to the second request, therefore
the user is never logged in.  Instead, it looks like a new JSESSIONID is
created and the site redirects me to the Login page (step 1).  I can never
login to the site! If the script was working correctly, I would expect that
after step 2 the user to login to the site.

Any ideas?  Very much appreciated.

Brau


-- 
View this message in context: http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How do you pass a JSESSIONID to other requests after Login?

Posted by Deepak Shetty <sh...@gmail.com>.
hi
looks right. if you add a view results in tree listener then do you see the
value correctly?
Also use livehttpheaders and firefox to check what happens when you run your
app using a browser (some app's do give you a new session id). Also verify
that no additional id's are set when you access the site through the browser
(e.g. some sites assign an auth cookie when you access the site using https
typically during login)

regards
deepak

On Fri, Aug 7, 2009 at 1:14 PM, Braulio <br...@gmail.com> wrote:

>
> Hi Guys,
>
> Thanks for the quick response.  To answer Deepak's question:
>
> a. I used the Debug sampler and verified that I was getting the correct
> value.
> Note: I'm extracting the JSESSIONID from the body of the first page request
> and storing it in a variable called "jsessionid".  The JSESSIONID looks
> like
> this:
>
> <form id="signinform" class="form" method="post"
> action="/faces/SignIn.jsp;jsessionid=8E8F6100D7A1A6BF76967DF591800876"
>
> The next HTTP request is: /faces/SignIn.jsp;jsessionid=${jsessionid}
>
> Is this correct?
>
>
> Deepak Shetty wrote:
> >
> > Hi
> > a. use a debug sampler or just type ${variableNameYouveUsed} in the next
> > sampler name to check what value you are getting , if this value is
> > correct
> > , how exactly are you passing it to the next request .
> >
> > b. An easier solution is to use the HTTPCookieManager under your thread
> > group so that the JSESSIONID is stored as a cookie (assuming your server
> > is
> > configured for both urlrewriting and cookies which you can verify whether
> > the first response has a Set-Cookie)
> >
> > regards
> > deepak
> >
> > On Fri, Aug 7, 2009 at 10:45 AM, Braulio <br...@gmail.com> wrote:
> >
> >>
> >> Hi All,
> >>
> >> I'm running into an issue with JMeter in that I can't pass the
> JSESSIONID
> >> to
> >> other requests in the same Thread Group in my JMeter script.
> >>
> >> The script is very simple (all in one thread group):
> >> 1. Send HTTP request to go to Login page
> >> >> Regular Expression Extractor to get JSESSIONID and store in variable
> >> 2. Send HTTP request to Login to site (POST)
> >> 3. Send HTTP request to Logout (POST)
> >>
> >> The problem is that even though I'm extracting the JSESSIONID (I think
> >> I'm
> >> doing it right) it doesn't seem to pass it to the second request,
> >> therefore
> >> the user is never logged in.  Instead, it looks like a new JSESSIONID is
> >> created and the site redirects me to the Login page (step 1).  I can
> >> never
> >> login to the site! If the script was working correctly, I would expect
> >> that
> >> after step 2 the user to login to the site.
> >>
> >> Any ideas?  Very much appreciated.
> >>
> >> Brau
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24870515.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How do you pass a JSESSIONID to other requests after Login?

Posted by Adrian Speteanu <as...@gmail.com>.
yes, but it should work for him to just use the cookie manager. that
is the best solution to deal with jsessionid.

or he can just make the request as deepak suggested:
.../something.jsp;${extracted_jsessionid}?variable=x&and_so_on_if_required
(directly in the http sampler)

also, he said he found the jsession in the body.
usually it is send in one of the response headers.
Something like Set-Cookie: JSESSIONID=xyz... appears in the Sampler Result.
I assume it is safer to assume that is best to extract it from there.

On Fri, Aug 7, 2009 at 11:38 PM, Deepak Shetty<sh...@gmail.com> wrote:
> Hi
> I havent used this myself but can you try
> http://jakarta.apache.org/jmeter/usermanual/build-adv-web-test-plan.html#session_url_rewriting
> regards
> deepak
>
> On Fri, Aug 7, 2009 at 1:14 PM, Braulio <br...@gmail.com> wrote:
>
>>
>> Hi Guys,
>>
>> Thanks for the quick response.  To answer Deepak's question:
>>
>> a. I used the Debug sampler and verified that I was getting the correct
>> value.
>> Note: I'm extracting the JSESSIONID from the body of the first page request
>> and storing it in a variable called "jsessionid".  The JSESSIONID looks
>> like
>> this:
>>
>> <form id="signinform" class="form" method="post"
>> action="/faces/SignIn.jsp;jsessionid=8E8F6100D7A1A6BF76967DF591800876"
>>
>> The next HTTP request is: /faces/SignIn.jsp;jsessionid=${jsessionid}
>>
>> Is this correct?
>>
>>
>> Deepak Shetty wrote:
>> >
>> > Hi
>> > a. use a debug sampler or just type ${variableNameYouveUsed} in the next
>> > sampler name to check what value you are getting , if this value is
>> > correct
>> > , how exactly are you passing it to the next request .
>> >
>> > b. An easier solution is to use the HTTPCookieManager under your thread
>> > group so that the JSESSIONID is stored as a cookie (assuming your server
>> > is
>> > configured for both urlrewriting and cookies which you can verify whether
>> > the first response has a Set-Cookie)
>> >
>> > regards
>> > deepak
>> >
>> > On Fri, Aug 7, 2009 at 10:45 AM, Braulio <br...@gmail.com> wrote:
>> >
>> >>
>> >> Hi All,
>> >>
>> >> I'm running into an issue with JMeter in that I can't pass the
>> JSESSIONID
>> >> to
>> >> other requests in the same Thread Group in my JMeter script.
>> >>
>> >> The script is very simple (all in one thread group):
>> >> 1. Send HTTP request to go to Login page
>> >> >> Regular Expression Extractor to get JSESSIONID and store in variable
>> >> 2. Send HTTP request to Login to site (POST)
>> >> 3. Send HTTP request to Logout (POST)
>> >>
>> >> The problem is that even though I'm extracting the JSESSIONID (I think
>> >> I'm
>> >> doing it right) it doesn't seem to pass it to the second request,
>> >> therefore
>> >> the user is never logged in.  Instead, it looks like a new JSESSIONID is
>> >> created and the site redirects me to the Login page (step 1).  I can
>> >> never
>> >> login to the site! If the script was working correctly, I would expect
>> >> that
>> >> after step 2 the user to login to the site.
>> >>
>> >> Any ideas?  Very much appreciated.
>> >>
>> >> Brau
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
>> >> Sent from the JMeter - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24870515.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How do you pass a JSESSIONID to other requests after Login?

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
I havent used this myself but can you try
http://jakarta.apache.org/jmeter/usermanual/build-adv-web-test-plan.html#session_url_rewriting
regards
deepak

On Fri, Aug 7, 2009 at 1:14 PM, Braulio <br...@gmail.com> wrote:

>
> Hi Guys,
>
> Thanks for the quick response.  To answer Deepak's question:
>
> a. I used the Debug sampler and verified that I was getting the correct
> value.
> Note: I'm extracting the JSESSIONID from the body of the first page request
> and storing it in a variable called "jsessionid".  The JSESSIONID looks
> like
> this:
>
> <form id="signinform" class="form" method="post"
> action="/faces/SignIn.jsp;jsessionid=8E8F6100D7A1A6BF76967DF591800876"
>
> The next HTTP request is: /faces/SignIn.jsp;jsessionid=${jsessionid}
>
> Is this correct?
>
>
> Deepak Shetty wrote:
> >
> > Hi
> > a. use a debug sampler or just type ${variableNameYouveUsed} in the next
> > sampler name to check what value you are getting , if this value is
> > correct
> > , how exactly are you passing it to the next request .
> >
> > b. An easier solution is to use the HTTPCookieManager under your thread
> > group so that the JSESSIONID is stored as a cookie (assuming your server
> > is
> > configured for both urlrewriting and cookies which you can verify whether
> > the first response has a Set-Cookie)
> >
> > regards
> > deepak
> >
> > On Fri, Aug 7, 2009 at 10:45 AM, Braulio <br...@gmail.com> wrote:
> >
> >>
> >> Hi All,
> >>
> >> I'm running into an issue with JMeter in that I can't pass the
> JSESSIONID
> >> to
> >> other requests in the same Thread Group in my JMeter script.
> >>
> >> The script is very simple (all in one thread group):
> >> 1. Send HTTP request to go to Login page
> >> >> Regular Expression Extractor to get JSESSIONID and store in variable
> >> 2. Send HTTP request to Login to site (POST)
> >> 3. Send HTTP request to Logout (POST)
> >>
> >> The problem is that even though I'm extracting the JSESSIONID (I think
> >> I'm
> >> doing it right) it doesn't seem to pass it to the second request,
> >> therefore
> >> the user is never logged in.  Instead, it looks like a new JSESSIONID is
> >> created and the site redirects me to the Login page (step 1).  I can
> >> never
> >> login to the site! If the script was working correctly, I would expect
> >> that
> >> after step 2 the user to login to the site.
> >>
> >> Any ideas?  Very much appreciated.
> >>
> >> Brau
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24870515.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How do you pass a JSESSIONID to other requests after Login?

Posted by Deepak Shetty <sh...@gmail.com>.
thats not right. The session id isnt part of the parameters
a.jsp;jsessionid=xyz?param1=val1

regards
deepak

On Fri, Aug 7, 2009 at 1:32 PM, Tony Lotts <tl...@gmail.com> wrote:

> Use the variable in a POST parameter.
> Name: jsessionid
> Value: ${jsessionid}
>
> On Fri, Aug 7, 2009 at 4:14 PM, Braulio <br...@gmail.com> wrote:
>
> >
> > Hi Guys,
> >
> > Thanks for the quick response.  To answer Deepak's question:
> >
> > a. I used the Debug sampler and verified that I was getting the correct
> > value.
> > Note: I'm extracting the JSESSIONID from the body of the first page
> request
> > and storing it in a variable called "jsessionid".  The JSESSIONID looks
> > like
> > this:
> >
> > <form id="signinform" class="form" method="post"
> > action="/faces/SignIn.jsp;jsessionid=8E8F6100D7A1A6BF76967DF591800876"
> >
> > The next HTTP request is: /faces/SignIn.jsp;jsessionid=${jsessionid}
> >
> > Is this correct?
> >
> >
> > Deepak Shetty wrote:
> > >
> > > Hi
> > > a. use a debug sampler or just type ${variableNameYouveUsed} in the
> next
> > > sampler name to check what value you are getting , if this value is
> > > correct
> > > , how exactly are you passing it to the next request .
> > >
> > > b. An easier solution is to use the HTTPCookieManager under your thread
> > > group so that the JSESSIONID is stored as a cookie (assuming your
> server
> > > is
> > > configured for both urlrewriting and cookies which you can verify
> whether
> > > the first response has a Set-Cookie)
> > >
> > > regards
> > > deepak
> > >
> > > On Fri, Aug 7, 2009 at 10:45 AM, Braulio <br...@gmail.com> wrote:
> > >
> > >>
> > >> Hi All,
> > >>
> > >> I'm running into an issue with JMeter in that I can't pass the
> > JSESSIONID
> > >> to
> > >> other requests in the same Thread Group in my JMeter script.
> > >>
> > >> The script is very simple (all in one thread group):
> > >> 1. Send HTTP request to go to Login page
> > >> >> Regular Expression Extractor to get JSESSIONID and store in
> variable
> > >> 2. Send HTTP request to Login to site (POST)
> > >> 3. Send HTTP request to Logout (POST)
> > >>
> > >> The problem is that even though I'm extracting the JSESSIONID (I think
> > >> I'm
> > >> doing it right) it doesn't seem to pass it to the second request,
> > >> therefore
> > >> the user is never logged in.  Instead, it looks like a new JSESSIONID
> is
> > >> created and the site redirects me to the Login page (step 1).  I can
> > >> never
> > >> login to the site! If the script was working correctly, I would expect
> > >> that
> > >> after step 2 the user to login to the site.
> > >>
> > >> Any ideas?  Very much appreciated.
> > >>
> > >> Brau
> > >>
> > >>
> > >> --
> > >> View this message in context:
> > >>
> >
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
> > >> Sent from the JMeter - User mailing list archive at Nabble.com.
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24870515.html
> > Sent from the JMeter - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
>

Re: How do you pass a JSESSIONID to other requests after Login?

Posted by Tony Lotts <tl...@gmail.com>.
Use the variable in a POST parameter.
Name: jsessionid
Value: ${jsessionid}

On Fri, Aug 7, 2009 at 4:14 PM, Braulio <br...@gmail.com> wrote:

>
> Hi Guys,
>
> Thanks for the quick response.  To answer Deepak's question:
>
> a. I used the Debug sampler and verified that I was getting the correct
> value.
> Note: I'm extracting the JSESSIONID from the body of the first page request
> and storing it in a variable called "jsessionid".  The JSESSIONID looks
> like
> this:
>
> <form id="signinform" class="form" method="post"
> action="/faces/SignIn.jsp;jsessionid=8E8F6100D7A1A6BF76967DF591800876"
>
> The next HTTP request is: /faces/SignIn.jsp;jsessionid=${jsessionid}
>
> Is this correct?
>
>
> Deepak Shetty wrote:
> >
> > Hi
> > a. use a debug sampler or just type ${variableNameYouveUsed} in the next
> > sampler name to check what value you are getting , if this value is
> > correct
> > , how exactly are you passing it to the next request .
> >
> > b. An easier solution is to use the HTTPCookieManager under your thread
> > group so that the JSESSIONID is stored as a cookie (assuming your server
> > is
> > configured for both urlrewriting and cookies which you can verify whether
> > the first response has a Set-Cookie)
> >
> > regards
> > deepak
> >
> > On Fri, Aug 7, 2009 at 10:45 AM, Braulio <br...@gmail.com> wrote:
> >
> >>
> >> Hi All,
> >>
> >> I'm running into an issue with JMeter in that I can't pass the
> JSESSIONID
> >> to
> >> other requests in the same Thread Group in my JMeter script.
> >>
> >> The script is very simple (all in one thread group):
> >> 1. Send HTTP request to go to Login page
> >> >> Regular Expression Extractor to get JSESSIONID and store in variable
> >> 2. Send HTTP request to Login to site (POST)
> >> 3. Send HTTP request to Logout (POST)
> >>
> >> The problem is that even though I'm extracting the JSESSIONID (I think
> >> I'm
> >> doing it right) it doesn't seem to pass it to the second request,
> >> therefore
> >> the user is never logged in.  Instead, it looks like a new JSESSIONID is
> >> created and the site redirects me to the Login page (step 1).  I can
> >> never
> >> login to the site! If the script was working correctly, I would expect
> >> that
> >> after step 2 the user to login to the site.
> >>
> >> Any ideas?  Very much appreciated.
> >>
> >> Brau
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24870515.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How do you pass a JSESSIONID to other requests after Login?

Posted by Braulio <br...@gmail.com>.
Hi Guys,

Thanks for the quick response.  To answer Deepak's question:

a. I used the Debug sampler and verified that I was getting the correct
value.  
Note: I'm extracting the JSESSIONID from the body of the first page request
and storing it in a variable called "jsessionid".  The JSESSIONID looks like
this:

<form id="signinform" class="form" method="post"
action="/faces/SignIn.jsp;jsessionid=8E8F6100D7A1A6BF76967DF591800876" 

The next HTTP request is: /faces/SignIn.jsp;jsessionid=${jsessionid}

Is this correct?


Deepak Shetty wrote:
> 
> Hi
> a. use a debug sampler or just type ${variableNameYouveUsed} in the next
> sampler name to check what value you are getting , if this value is
> correct
> , how exactly are you passing it to the next request .
> 
> b. An easier solution is to use the HTTPCookieManager under your thread
> group so that the JSESSIONID is stored as a cookie (assuming your server
> is
> configured for both urlrewriting and cookies which you can verify whether
> the first response has a Set-Cookie)
> 
> regards
> deepak
> 
> On Fri, Aug 7, 2009 at 10:45 AM, Braulio <br...@gmail.com> wrote:
> 
>>
>> Hi All,
>>
>> I'm running into an issue with JMeter in that I can't pass the JSESSIONID
>> to
>> other requests in the same Thread Group in my JMeter script.
>>
>> The script is very simple (all in one thread group):
>> 1. Send HTTP request to go to Login page
>> >> Regular Expression Extractor to get JSESSIONID and store in variable
>> 2. Send HTTP request to Login to site (POST)
>> 3. Send HTTP request to Logout (POST)
>>
>> The problem is that even though I'm extracting the JSESSIONID (I think
>> I'm
>> doing it right) it doesn't seem to pass it to the second request,
>> therefore
>> the user is never logged in.  Instead, it looks like a new JSESSIONID is
>> created and the site redirects me to the Login page (step 1).  I can
>> never
>> login to the site! If the script was working correctly, I would expect
>> that
>> after step 2 the user to login to the site.
>>
>> Any ideas?  Very much appreciated.
>>
>> Brau
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24870515.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How do you pass a JSESSIONID to other requests after Login?

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
a. use a debug sampler or just type ${variableNameYouveUsed} in the next
sampler name to check what value you are getting , if this value is correct
, how exactly are you passing it to the next request .

b. An easier solution is to use the HTTPCookieManager under your thread
group so that the JSESSIONID is stored as a cookie (assuming your server is
configured for both urlrewriting and cookies which you can verify whether
the first response has a Set-Cookie)

regards
deepak

On Fri, Aug 7, 2009 at 10:45 AM, Braulio <br...@gmail.com> wrote:

>
> Hi All,
>
> I'm running into an issue with JMeter in that I can't pass the JSESSIONID
> to
> other requests in the same Thread Group in my JMeter script.
>
> The script is very simple (all in one thread group):
> 1. Send HTTP request to go to Login page
> >> Regular Expression Extractor to get JSESSIONID and store in variable
> 2. Send HTTP request to Login to site (POST)
> 3. Send HTTP request to Logout (POST)
>
> The problem is that even though I'm extracting the JSESSIONID (I think I'm
> doing it right) it doesn't seem to pass it to the second request, therefore
> the user is never logged in.  Instead, it looks like a new JSESSIONID is
> created and the site redirects me to the Login page (step 1).  I can never
> login to the site! If the script was working correctly, I would expect that
> after step 2 the user to login to the site.
>
> Any ideas?  Very much appreciated.
>
> Brau
>
>
> --
> View this message in context:
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How do you pass a JSESSIONID to other requests after Login?

Posted by Tony Lotts <tl...@gmail.com>.
Can you post an example of the JSESSIONID?

On Fri, Aug 7, 2009 at 1:45 PM, Braulio <br...@gmail.com> wrote:

>
> Hi All,
>
> I'm running into an issue with JMeter in that I can't pass the JSESSIONID
> to
> other requests in the same Thread Group in my JMeter script.
>
> The script is very simple (all in one thread group):
> 1. Send HTTP request to go to Login page
> >> Regular Expression Extractor to get JSESSIONID and store in variable
> 2. Send HTTP request to Login to site (POST)
> 3. Send HTTP request to Logout (POST)
>
> The problem is that even though I'm extracting the JSESSIONID (I think I'm
> doing it right) it doesn't seem to pass it to the second request, therefore
> the user is never logged in.  Instead, it looks like a new JSESSIONID is
> created and the site redirects me to the Login page (step 1).  I can never
> login to the site! If the script was working correctly, I would expect that
> after step 2 the user to login to the site.
>
> Any ideas?  Very much appreciated.
>
> Brau
>
>
> --
> View this message in context:
> http://www.nabble.com/How-do-you-pass-a-JSESSIONID-to-other-requests-after-Login--tp24869203p24869203.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>