Thanks amit punekar for the advice.
Here are a few more code snippets to help you understand my problem.
Code Sample of form.jsp
Code of proc.jsp (Shown in view source from browser)
Code Sample of result.jsp
So this is how the process currently work.
1) The user use the form in "form.jsp"
2) "form.jsp" post the data to "https://www.remote.com/payment/proc.jsp"
3) "proc.jsp" return a web page that tells if transaction is successful. It also has a built in timer that will direct the page to the
ReturnURL that is currently set to "https://www.local.com/payment/result.jsp"
4) "result.jsp" will print the request parameters.
What I need.
1) Get the request parameters being sent to "result.jsp". Using the code in my very first post I was able to retrieve the HTML code of "proc.jsp". But "proc.jsp" has a built in script that redirects it to the submitted ReturnURL. This is fine if I wanted to show the results given by the REMOTE web app but I want to do some additional processing in my LOCAL web app.
2) So can anyone help me extend/modify the code in my first post to be able to receive the request parameters that is bound for the ReturnURL = "result.jsp".
Notes:
1) ReturnURL is a required parameter of the proc.jsp
2) I have no control on the implementation of the REMOTE web app.
Thanks in advance.