• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connect, send & recieve data from remote php app inside servlet  RSS feed

 
DC Dalton
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Man Im stuck again. What I have is a servlet that must connect to a remote php app, send it some data and then collect the response from that php app back at the servlet. Then I have to do some things with the data etc etc.

Maybe Im way off base here but I was using an HttpURLConnection object to do this but I can seem to find a way to send the outside app the data I need to send and then grab the response from that app. I seem to be making a connection fine because my getResponseMessage() method is returning OK.

Anyone point me in the right direction here or have some example code (that would be awesome) .... Im really stuck here as Ive never dont this quite like this!

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpUrlConnection can certainly do what you want.
Using http://jakarta.apache.org/commons/httpclient may save you some work.

You're not giving us much to work with.
Can you post the relevent parts of your code?
[ July 12, 2005: Message edited by: Ben Souther ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!