You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Alan Molloy (ext. 713)" <Al...@fineos.com> on 2004/01/28 16:54:42 UTC

Request address after redirect

Hi,
I wish to carry out a POST after a http request sampler that followed
redirects. The response from the last redirect had a <FORM> action tag left
blank, and hence, the post is to the location of the last redirect(ie. the
URL address as displayed in the browser, both URL and parameters, eg.
"http://myhome/context/redirectedlocation/redirected.jsp?redirectparam1=val1
&redirectparam2=val2").
Because of the dependency on redirects, and the amount of dynamic URL
rewriting going on, I cannot hardcode the address, because I can't predict
what address the server will redirect to. Is this address available using
jmeter to populate the path of the next http request? I can see jmeter
accessing it when I look at the results tree request data from the last
redirect, but just don't know how to get my hands on it for the next
request. I'm assuming regexp's only work off the previous response and not
the request?
Any advice greatly appreciated.
Kind Regards,
Alan Molloy




**********************************************************************
The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above.  If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else.  If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received.  This e-mail has been swept for computer viruses.  However, you should carry out your own virus checks. 
Registered in Ireland, No. 205721.  http://www.FINEOS.com
**********************************************************************


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


Re: Request address after redirect

Posted by Jordi Salvat i Alabart <js...@atg.com>.
The HTML Link Parser pre-processor should do this... my experience with 
it is very variable :-( but I would still give it a try.

If you know there will be a single redirect (and not a chain of them), 
you can also uncheck the "follow redirects" option and use a Regexp 
Extractor to find the URL in the response, then use that variable both 
to get the form and to post the response.

Hope this helps.

Salut,

Jordi.

En/na Alan Molloy (ext. 713) ha escrit:
> Hi,
> I wish to carry out a POST after a http request sampler that followed
> redirects. The response from the last redirect had a <FORM> action tag left
> blank, and hence, the post is to the location of the last redirect(ie. the
> URL address as displayed in the browser, both URL and parameters, eg.
> "http://myhome/context/redirectedlocation/redirected.jsp?redirectparam1=val1
> &redirectparam2=val2").
> Because of the dependency on redirects, and the amount of dynamic URL
> rewriting going on, I cannot hardcode the address, because I can't predict
> what address the server will redirect to. Is this address available using
> jmeter to populate the path of the next http request? I can see jmeter
> accessing it when I look at the results tree request data from the last
> redirect, but just don't know how to get my hands on it for the next
> request. I'm assuming regexp's only work off the previous response and not
> the request?
> Any advice greatly appreciated.
> Kind Regards,
> Alan Molloy
> 
> 
> 
> 
> **********************************************************************
> The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above.  If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else.  If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received.  This e-mail has been swept for computer viruses.  However, you should carry out your own virus checks. 
> Registered in Ireland, No. 205721.  http://www.FINEOS.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