Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat not accessed on the another machine

 
Niranjan Bathula
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

this is niranjan

i had a stack up with the tomcat issue like

actually i had application running over tomcat
the url is like localhost:8084\app , it is accessible on the local machine
but it is not accessed on the another machine. with same url or with ip .

thank you

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using "localhost" only works on the machine the server runs on - thats what it means. Other machines on the network will have to use the network address of the machine the server runs on.

Bill
 
Krishnam Ch
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If other machine in same LAN/Network then using url with IP address (IPAddress:8084\app) will work.If you are in same LAN but not able to access url with Ip then there might be some issue in network and you should contact your network/It administrator. If you want to access Url from some other machine (wchich is not in same Lan) then you should host your website/application
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The URL "localhost:8084\app" is invalid. The use of a backslash is a convention of Windows filesystem paths. URLs are neither Windows nor are they filesystem paths.

Beyond that, as William said, "localhost" is the address of whatever machine you are directly attached, so if you want to communicate with a different machine, it must have at least 1 external IP address, which can be used directly or by looking up a domain hostname in a resolver such as DNS or a "hosts" file. And, of course, open filewall for port 8084 so that the attempt isn't blocked.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic