Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to serve my website using tomcat.

I am not using apache and using tomcat as my webserver only. I have defaulted port to 80 and currently I have mywebsite.war lying in webapps folder. When I start tomcat, mywebsite unzips and gets deployed to a folder named mywebsite in webapps only.

The problem I am facing is that when I try to access my site as , it opens tomcat welcome page not my website [which is understandable s some issue in my configuration].

To access my website, I have to type the sub-folder name as well. That means, I use to access my web site.

Could some one please guide me about how can I serve my website from only ?

What extra configuration will I have to do here?

share|improve this question
are you using apache infront of Tomcat? – Abhishek Anand Amralkar May 15 '13 at 5:43
Nope, I am not using apache like I mentioned earlier. – Sfdc Workhorse May 15 '13 at 6:24
This question on stackoverflow should be helpful: There are a couple of ways detailed there to do what you want. – davey May 15 '13 at 7:30

When tomcat receive a request, it tries to understand what webapps is responsible for it. The way it assign request to webapp is checking the context, i.e., the first part of the url path. Since your webapps have a context of mywebsite, then it only gets requests that start with path /mywebsite/. When tomcat does not find a suitable web apps, it defaults to the ROOT context.

So, in order to catch all such requests, you should name your webapp as ROOT (or probably just change its context to ROOT), or install a different webapps on the ROOT context that redirect to your current URL.

share|improve this answer

What you are trying to do, is to load your application as "ROOT context". To do that you have two easy choices :

  1. Put your files directly in place of Tomcat defaults files (/webapps/ROOT/here), replacing webapps/ROOT/WEB-INF/web.xml, etc.
  2. Renaming your war to ROOT.war and putting it inside /webapps/ROOT.war

I also recommand removing all default Tomcat files in this directory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.