• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Accessing JSP page from network

 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
I jave JDK 1.2.2 and Tomcat on my workstation.
I can access JSP page using following syntax : http://localhost:8080/examples/jsp/logon.jsp
Is it possible to access logon.jsp from another workstation on the same network ?
Thanks
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure, You can do that.
Use your mahine name (or IP address) in the place of localhost.
To know the IP address of your machine type "ipconfig" at command prompt.

------------------
Prasad
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure, but that other station must use your machine's network name or ip address, not localhost. Only your machine thinks of itself as localhost.
Bill
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to make sure this is as clear as possible; "localhost" is a special name which always refers to the machine itself. Some operating systems (ie Windows) enforce this, some (ie Linux) may allow you to change it (but that would be a mad thing to do!).
A machine on a network is known by several things. To itself it is known by the name "localhost" and the special IP address "127.0.0.1". To all machines on the network it is known by whatever other names and IP addresses it may have been assigned.
As a concrete example. I have a Linux machine on my home network which acts as a dial-up router, web server, DNS server, DHCP server, mail host and general box. To itself it is "localhost" and "127.0.0.1". In its "hostname" it has the name "aylesbury". Its primary IP address is "172.16.1.4". In its "domain" it has "efsol.com". From my other machines on the network, I can refer to this machine as "aylesbury", "aylesbury.efsol.com", or "172.16.1.4".
When it dials up the internet it is dynamically assigned an extra name and IP address by the remote system, so it may also be something like "modem456.ntl.com" and "199.1.2.4" I never use this name or address (it changes every time I connect up), but it is still there while I'm connected.
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic