• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing JSP page from network

 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • 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
 
Prasad Charasala
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • 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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • 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
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic