dnsglassfishhostingvirtual-server

Direct a URL directly to a GlassFish application in a virtual server


We have a domain name with DNS management facility. We also have a web application developed in a GlassFish server hosted in a virtual server with a path is

http://198.98.103.233:8080/pemis/

I want to direct to the home page of that application when some one type the domain name. After navigating through the pages, we must be able to see

http://www.pemis.lk/faces/public.xhtml

in the browser rather than

http://198.98.103.233:8080/pemis/faces/public.xhtml

How can we configure that.

Thanks in advance.


Solution

  • I'm on the same path and, as you don't posted the solution that you found (if you found it), I'll add here some future reference for anyone facing this problem.

    I'll break the question in two parts: Eliminating host:port and changing how the URL behave.

    I don't have a complete response to the first, however if you chose to listen at port 80, by HTML standard, you will supress the port on the URL, getting half the solution you want.

    The second part, changing the URL behavior and/or shortening it can be achieved by either using mod_rewrite in apache or Tuckey's URL Rewrite Filter (http://www.tuckey.org/urlrewrite/). A google search using URL Rewrite can achieve you a more in depth explanation and there's a guide on the website.

    You should, however, update your question with an answer, if you found one.