This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Redirect or DNS alias? " Watch "Redirect or DNS alias? " New topic
Author

Redirect or DNS alias?

jay lai
Ranch Hand

Joined: Apr 04, 2002
Posts: 180
Hello,
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

http://abc.com
http://abc
http://otheralias
--> it all will direct to http://abc.com

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

Joined: Dec 11, 2004
Posts: 13410

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

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Host%20Name%20Aliases


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 www.mymachine.com ---> it redirect me to http://localhost:7070/works[/B]

Please giving more help or assist.
Thanks

jay lai
Ranch Hand

Joined: Apr 04, 2002
Posts: 180
Can someone help on this? thanks a bunch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Redirect or DNS alias?
 
Similar Threads
Jboss SSL
Path to servlet
Please anybody? RequestDispatcher ?
Redirect or DNS alias?
Apache