Link to home
Start Free TrialLog in
Avatar of krishnamukuntha
krishnamukunthaFlag for United States of America

asked on

Sending a xml file/String to remote servlet.

Hi All
I am running a query and getting the resultset and using that i am formulating a string in xml format.My query here is i need to send that string/xmlfile to a remote servlet.
help me out how to send that to remote servlet(I need to send in post method only)
Avatar of Kuldeepchaturvedi
Kuldeepchaturvedi
Flag of United States of America image

https://www.experts-exchange.com/questions/20665134/Using-java-net-url-or-JSTL-to-access-remote-URLs.html

Only thing that you might want to change in the code is the method that I am setting to GET... you will have to convert it to POST
Avatar of krishnamukuntha

ASKER

I want to send it from my servlet to remote
i hope your code is doing on other way...
nopes its sending to the remote URL and reading the response back
let me rephrase my query:
On Click of a button i am hittin the DB and creating report in xml format by looping the Resultset.
Now i ned to send the created xml file to repmote servlet.
I also need to know how the remort server can get my file in its doPost Method
ASKER CERTIFIED SOLUTION
Avatar of Kuldeepchaturvedi
Kuldeepchaturvedi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks kuldeep
whole nation will proud of you :)
:-) glad to be of help
thanks for the 'A' grade...