on 2010 Apr 07 10:35 AM
Hi All,
I need help on the below requirement.
I need to call an URL by passing two values and the resultant htl on this shouls captured to retrieve a value and this value should be taken up and passed to next URL to display.
For the first URL a window should not open but just result should be captured and using this second result should ba called which should be displayed in a new window.
I seen the WDJ Ui elements and found that LinkToAction and LinkToURL will suit for first and second one respectively.
But how capture the resultant html after from the first URL is what i am intrested in.
Thanks
Supriya
Hi Supriya,
One way to capture the response of URL is to use the HttpClient APIs provided by Apache. You can find more information on it [here|http://hc.apache.org/httpclient-3.x/]
Using the GET method of HTTP, you can retrieve whatever information is identified by the Request-URL. More information on it [here|http://hc.apache.org/httpclient-3.x/methods/get.html].
Regards,
JC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi JCardoza ,
Thanks for the reply. I will work on this. Is there any way that i avoid opening the page as my second url is th one which should opened when user clicks on it.
After user clicks on the first URL, i should catch the result and pass the value to second URL and this URL should be processed and opened in a new window.
Thanks
Supriya.
Hi Supriya,
Using the GetMethod class of HttpClient APIs, you can execute a request URL and collect the response without having to open it in a new window.
Sample Code and tutorial for using this class available at [http://hc.apache.org/httpclient-3.x/methods/get.html|http://hc.apache.org/httpclient-3.x/methods/get.html]
Regards,
JC
User | Count |
---|---|
66 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.