Search code examples
phptomcatbrowserwindows-server-2008tomcat8

Load a web application through tablet fails


In Windows Server 2008 R2 PC (which is named as srv), I have installed Tomcat Server as a service and I have deployed there my web application. I can access my application (from any Windows PC) through srv:8080/myWebApplication from the browser.

However, when I try to access the web application from a tablet, it seems that the srv isn't recognized and the browser doesn't load anything. In contrary, when I use the IP of the server instead of its name: 192.168.0.2:8080/myWebApplication the web application is loaded fine.

Which is the reason, why the first way doesn't work in the tablets?


Solution

  • This is just because your tablet does not know the name "srv" you are using to access your webapplication. You have to edit your "hosts file" in your tablet if it runs under Android OS. If you don't know what is "hosts file", have a look to your Windows\System32\drivers\etc\hosts file. This is a mapping file for servername <-> IP

    To see how to edit hosts file in android tablets :

    https://android.stackexchange.com/questions/60150/how-to-edit-etc-hosts-file