I have a Tomcat Server where a .war file is running.
I can run the .war file when typing localhost:8080/.. in the browser.
But I have to reach this .war file over network. So I have a external IP with a domain name on it.
And i should reach this .war file when typing xx.xxx.xxx.xxx:8080/.. in browser.
So this IP address should point to its localhost and further to the .war file.
How can I achieve this?
Basically you configure your connector with the optional "address" attribute containing the ip address that you want to bind to.
tomcat/conf/server.xml
<Connector
port="8080"
protocol="HTTP/1.1"
address="xxx.xxx.xxx.xxx"
connectionTimeout="20000"
redirectPort="8443"
/>
Information available at Tomcat homepage http://tomcat.apache.org/tomcat-7.0-doc/config/http.html and http://wiki.apache.org/tomcat/FAQ/Connectors#Q6.
If the external IP you have is assigned to WAN of your router, you'll have to set up port-forwarding or DMZ to your server using your routers admin panel. It's different for each brand, so you'll have to look it up for yours.
Tomcat by default is listening on all IP addresses.
Check your firewall or router. This is network/routing problem, not related with Tomcat configuration.
address : For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified port. By default, this port will be used on all IP addresses associated with the server.
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html
Check if your IP is binded to tomcat server.
Check if port is open
telnet xx.xxx.xxx.xxx 8080
Maybe it will be easier to change tomcat port from 8080 to 80. A lot of firewalls allows only port 80. You can see how to change it here: How to change the port of Tomcat from 8080 to 80?