3
2
What I have
I have a Tomcat 7.0 server running on my Windows 7 PC and I have a dial up internet connection. IP I get on whatismyip is 117.xxx.xxx.xxx
. I want to use this machine to test my Android Application.
I access the servlets on my Apache Tomcat 7 via Android Emulator through
http://10.0.2.2:8084/MyServer
I want to access the Server via my real Android Device.
What I did
- I'm using No-IP Free to covert my dynamic IP (I have a dial-up connection) to a static IP.
- I changed the Inbound Rules for port 8084 on my Windows 7 firewall, but it did not work.
As suggested by @slhck I have been able to access my router and did Advanced Setup » NAT » Virtual Server Setup and on this screen,
I added TCP, external and internal port both 8084, internal server set to
10.0.2.2
. The "Service Name" - "Tomcat".
@slhck We are not on the same network. I want to connect to my computer from outside. – Gaurav Agarwal – 2012-05-18T13:44:14.937
@slhck Hey, Thanks it worked I changed 10.0.2.2 to 127.0.0.1. This [Wiki]http://en.wikipedia.org/wiki/Localhost helped.
– Gaurav Agarwal – 2012-05-18T20:04:04.147Hm.. 127.0.0.1 is always the address of your own computer. I don't think you put 127.0.0.1 into your Android device and it worked? – slhck – 2012-05-18T20:21:53.720
So you had to put in 127.0.0.1 in your router? – slhck – 2012-05-18T20:26:11.157
I did so — you just forgot one comment above :) – slhck – 2012-05-18T20:32:12.833
@slhck This by farthest someone tried to help me on Stack, Super, Server. Deepest Thanks to you. – Gaurav Agarwal – 2012-05-18T20:36:32.000