Can anyone suggest me how to configure my localhost:8080 in tomcat to connecting to an IP address instead of localhost such that i access my localhost in any system in my workplace... i am using tomcat6 and netbeans 6.9.1
Your question is ambiguous dude.
If you are asking how you can make the hostname "localhost" resolve to something other than 127.0.0.1 then the answer is:
- change the localhost entry in your "/etc/hosts" file, and mess with the network configs, and
- DON'T DO IT because you are liable to break things.
If you are asking how to get Tomcat to accept requests on some other IP address, then the answer is to edit the
$CATALINA_HOME/conf/server.xml to add or change the relevant
<Connector> element. Of course, you can only listen on the configured IP address or addresses of your computer's network interface / interfaces.
This is the general method for nearly any (non-microsoft) service:
- Go through your configuration files for the service in question, and locate any references to either "localhost" or "127.0.0.1".
- Ponder for a moment about the wisdom of giving anybody unrestricted access to the service.
- Change the reference to reflect your external ip address or dns name.
You might need to change network routes on any gateways or routers that may exist between you and "everyone else".
So if I understand you, you want to remotely access your Tomcat which runs locally on port 8080?
You need to know the IP address of your machine first;
windows: - open a dos box - type:
linux: - go to shell - type
Your local IP address is listed. Now on your remote (at work) machine's browser enter the following URL:
If there are no firewalls blocking or other network problems you will see your tomcat page.
Since It is too late to respond, but today I faced same problem and resolved by allowing 8080 port in firewall rule.
sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
Note- In my case was able to access my server by url localhost:8080 but unable to access by url like 172.16.16.10:8080 from local as well as from remote machine.