Reputation: 443
In Android I need to make a socket or some kind of consistent connection to a servlet I made in tomcat. I was told when making a socket you have to give it an IP address instead of an URL. Problem is that normally to access it I'd go to [IP]/papon/[more address]
and just the IP alone isn't hitting it.
So how do I get it to hit that specific servlet or call a get from it?
Upvotes: 0
Views: 127
Reputation: 891
You will have to let the server know what path you are requesting. After opening the socket try writing to the output stream:
GET /papon/[more address] HTTP/1.0
Followed by two newline characters
Upvotes: 1