• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Accessing webapp from android browser

 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.

I have a web application which is right now working fine. Now my client want to access it from an android device. I tried giving this url in android browser which I normally do in pc "192.168.1.3:8080" now I cant even see the default page of tomcat. I am using tomcat 7.x.

After that I started to search and found this 10.0.2.2 and emulator stuff. To be frank I dint understand those. How could someone give a different url when my ip is something else.

I don't know android development but I am quite good in java. Now i am confused, do I need to write the full app again. Please, someone tell me a simple solution.



Thanks and Regards.
Adeeb
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has nothing at all to do with Android, but with how the web and networking works. The 192.168.n.n addresses are local to the current LAN.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear.



I would just like to know that, do i need to rewrite the code so that it should work on android browser. I got this doubt because i am unable to connect to tomcat as I usually do from other pc on LAN. Can you please give an example of sample url?


Thanks.
Adeeb
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Re-read my reply. This has nothing to do with Android, why would the app need to be rewritten?

If you want to access the web app from outside the LAN, it needs a to be addressed by its WAN IP, not the LAN IP.
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Expose your server to the internet and have the android device access that IP instead of the IP that is only recognized on a LAN.
 
Water! People swim in water! Even tiny ads swim in water:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic