• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Other clients connecting to localhost

 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written some JSP and Servlet applications that simply run off my locally installed Tomcat "localhost" address.
Is there anyway that other web browser clients can hook into the localhost on my machine

Thanks for any help on this
[ November 14, 2002: Message edited by: mark howard ]
 
Saloon Keeper
Posts: 24296
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"localhost" is IP address 127.0.0.1, but that's a non-unique address. Assuming that you're on a LAN with TCP/IP, you'll also have a unique TCP/IP address as well, which (depending on OS) can be determined using a command named something like "ipconfig", "ifconfig", or (windows 9x) winipcfg.
So if your machine is at IP 216.199.21.14, they could access a web server on your machine as "http://216.199.21.14".
If you're on a DHCP subnet, however, this IP address is assigned dynamically and subject to change (particularly when you reboot). On a Windows network, you may be able to avoid this by referencing the machine using its Windows network name (http://RODNEY, if your machine name is "RODNEY".
This is exactly how the Internet works. If your installation has a domain name of "id.com", and you have been identified to a Domain Name Server, people could pull up pages at "http://rodney.id.com" - "www" is just a common alias for the webserver's machine name.
Of course, all this is assuming that no firewalls are blocking people.
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your informative reply, Tim
I'll hack around and try out your suggestions.
Cheers
Mark.
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup, it worked as Tim specified in

This is exactly how the Internet works. If your installation has a domain name of "id.com", and you have been identified to a Domain Name Server, people could pull up pages at "http://rodney.id.com" - "www" is just a common alias for the webserver's machine name.


My "localhost" webserver servlets and JSP can be accessed by other users (presumably on the same domain) with:
"http://<machine name>.<domain name>.<domain name suffix>:<port>/<servlet/jsp name>"
Brilliant
reply
    Bookmark Topic Watch Topic
  • New Topic