I have an Android application that connects to a servlet in a Tomcat server.
I have Tomcat server coupled to eclipse.
The IP address indicated to the Android application to connect to the Tomcat servlet is
http://10.0.2.2:8080/Middleware/UsuarioServlet
Why if I put
http://localhost:8080/Middleware/UsuarioServlet
not work and gives an error? If I have installed Tomcat on the same machine should work with localhost too.