There are 2 parts to this.
1. You must register a domain name, which is basically publishing an Internet "telephone listing" so that when people type in a name like "www.mousetech.com", Domain Name Services will respond with the corresponding IP address (216.199.14.18). The domain name must reside in one of the standard top-level domains (TLDs), such as ".com", ".net", or a country code like ".uk". ".in". So "MyApplication" isn't a valid domain name, but "myapplication.co.in" would be.
You own a domain name, but you also have to register one or more host names in order for a browser request to resolve to a specific IP address. For example, I have several different "mousetech.com" machines, but the choice of which machine a request gets routed to (IP address) is determined by the hostname part of the so-called fully-qualified domain name (FQDN). In the case of my primary server, that's the "www" machine, so the full URL domain name is www. mousetech.com.
2. Once you have published a FQDN with its associated IP address, the Internet can route traffic to the server machine. The DNS address contains
only domain name and IP address, however, not the port number (8080).
Web browsers will send "http" requests to the target machine's port 80 (https requests get sent to port 443). That's hard-coded into the browser program, so we have to explicitly supply any alternative port (such as 8080). That's inconvenient, so a little help on the server side is required.
There are 2 ways of handling that.
A) You can reconfigure your
tomcat server to serve requests at port 80 instead if its default port 8080. That's not really a good idea, however, since port IDs less than 4096 require that their owning applications have administrative privileges, which can cause security vulnerabilities.
B) You can set up a local routing mechanism that accepts port 80 requests and routes them to Tomcat's port 8080. This is often done using Apache httpd server as the front-end server and a Tomcat connector so that Apache can route to Tomcat.