Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XMLHttpRequest equivalent call in java

user11989926May 22 2010 — edited May 31 2010
Hi, All

I am making XMLHttpRequest through javascript. Can anyone let me know the equivalent code in java:


http_request = new XMLHttpRequest();

http_request.onreadystatechange = alertContents;
if(method=='POST') {
http_request.open(method, url, true);
http_request.setRequestHeader("Content-type", "text/xml");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
// alert('before sending request');
http_request.send(parameters);
//alert('after sending request');


Thanks much..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2010
Added on May 22 2010
3 comments
4,776 views