How to call a remote RESTful web service

I read tutorials on how to create REST web services using Jersey and Tomcat. I made a small test web service in Eclipse, deployed it to a Tomcat server, and when I call the URI http: // localhost: 8080 / TestService / rest / HelloWorld / from the browser, it works fine.

My question is: how do I call this web service from another PC. I tried replacing "localhost" with the public IP (168.58.xx) and calling it through the browser of another PC, I do not get a response. I'm not sure if I am missing something here, or am doing something wrong.

+3
source share
1 answer

You must also forward the correct port to your router.

  • .
  • > NAT >
  • -, 8080 (LAN) ip
+1

All Articles