File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Redirect or DNS alias? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Redirect or DNS alias? " Watch "Redirect or DNS alias? " New topic

Redirect or DNS alias?

jay lai
Ranch Hand

Joined: Apr 04, 2002
Posts: 180
I am using apache-tomcat-6 as a web server.
I have a index.jsp, I want to create a DNS alias so when user enter like
--> it all will direct to

How do I set this up? What do I do in the index.jsp or in the server.xml?
Thank in advance
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You can set up host name aliases in your $CATALINA_HOME/conf/server.xml file.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
jay lai
Ranch Hand

Joined: Apr 04, 2002
Posts: 180
thank you for your link.
I read the links and it is showing to add the new entry into the server.xml in conf/ directory, and also I do have to register the alias into the server registry in order to make it works right?

also , if i want to test if the alias name work on my localmachine, how do I do that. I changed my server.xml to as the following

Usually if i access my local then i type
https://localhost:7070/works --> then I get into the first page index.jsp
so in the same token: I want to type ---> it redirect me to http://localhost:7070/works[/B]

Please giving more help or assist.

jay lai
Ranch Hand

Joined: Apr 04, 2002
Posts: 180
Can someone help on this? thanks a bunch
I agree. Here's the link:
subject: Redirect or DNS alias?
It's not a secret anymore!