This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes change from localhost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "change from localhost" Watch "change from localhost" New topic

change from localhost

Malhar Barai
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
hi all,
Well, servlet mapping could be done. i.e I was able to do te following
Original Path:
Which was mapped to :
But what i really need to do is:
How do I go about on this..??
Tried tweaking server.xml but no result.

Malhar Barai
SOA & Java Book
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Umm... first you need to register a domain, and have it point to the IP address of the box on which you are runnin tomcat.

If you're only running an intranet site, then you can get away with entering your domain into your internal DNS, and then it won't matter if the rest of the world doesn't see it.

To get Tomcat to respond to port 80 (the default, so that you won't need to type :80) is set in server.xml. Just search in that file for the current port (8080) and replace it with 80.

If you want it to respond to a certain 'named host', then configure a Host with that name, also in server.xml. I believe Tomcat needs a 'default' Host, so you will need at least two host entries now.
I agree. Here's the link:
subject: change from localhost