cancel
Showing results for 
Search instead for 
Did you mean: 

URL call in WDJ

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

JCardoza
Explorer
0 Kudos

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

Former Member
0 Kudos

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.

JCardoza
Explorer
0 Kudos

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

Former Member
0 Kudos

Thanks

Supriya