• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to change application url?

 
Ranch Hand
Posts: 31
Hibernate Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have developed a web application which runs on url like
http://MyIP:8080/MyApplication

i want to change it like
http://MyApplication

Is it possible? or any similar way? if anybody know kindly tell.

Thank You
Balaji
 
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not possible unless you host your web application over internet but that costs. If you give http://MyApplication,Your browser will directly look for MyApplication server over internet.
 
Saloon Keeper
Posts: 28323
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 75
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:
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.



more details here:
https://coderanch.com/t/535874/Tomcat/Configure-Apache-HTTp-Server-Tomcat
 
Tim Holloway
Saloon Keeper
Posts: 28323
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deepakkumar Devarajan wrote:It's not possible unless you host your web application over internet but that costs. If you give http://MyApplication,Your browser will directly look for MyApplication server over internet.



Actually, not 100% true. You can publish a host/domain name as a public Internet resource, but in some cases, that's not required, such as a departmental webserver that's only accessible on a LAN to people within the company. In cases like that, there's no need for a publicly-published DNS entry, but you will need local publication. That's generally done either by using a private corporate DNS server or by manually adding entries to the users' "hosts" files on their computers.
 
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic