Configure an IP address instead of localhost:8080 tomcat eg:192.260.0.2:8080
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.
Tomcat by default binds to all IP addresses (0.0.0.0)
Check your inbound firewall rules next. 8080 or whatever port you're using may be blocked.