Android connection request fails with tomcat server which runs in a different network
I created an Android application which sends a connection request to Servlet which runs in Tomcat server using
HttpUrlConnection. When I kept both Android app and Webserver in the same network, I am able to get the connection. But when I tried to keep Android in one network and Webserver in a different network, the connection request fails.
I got exception
I/io exception: failed to connect to /192.168.*.*** (port 8080): connect failed: ETIMEDOUT (Connection timed out)