title: How to make the application context run as root in Spring 3 MVC and eclipse
body: <p>I’m trying to develop a Spring 3 MVC application using the Springsource Tool Suite/Eclipse IDE.</p>
  
  <p>My current application context in STS/Eclipse is  <strong>/localhost:8080/realtyguide/</strong></p>
  
  <p>What I want is to access the application as root using just <strong>/localhost:8080/</strong>  </p>
  
  <p>I tried in eclipse..  Project > Properties > Web Project Settings > entered “/” for Context  Root .  But this just returned a “404 error - requested resource (/) is not available” after executing the app. And it also broke the app. So I just put context root back to 'realtyguide'.</p>
  
  <p>I deployed  the app to my webhost on a Tomcat server. I edited the server.xml’s  and   elements and so I was able to bring up the index page with the url   www.mydomain.com.</p>
  
  <p>However, the links to the other pages are broken. It is also not picking up the static resources for the index page like css and jquery files.</p>
  
  <p>I believe this is caused by my app’s application context of /localhost:8080/realtyguide/ in eclipse (in my development pc).  The rest of the pages returned by my controller has a url of <strong>/localhost:8080/realtyguide/page_name</strong></p>
  
  <p>How do I change my app’s application context to <strong>run as root in eclipse</strong>,  as in simply <strong>/localhost:8080/</strong>. So that my pages would be called as simply <strong>/localhost:8080/page_name</strong></p>
  
  <p>Is the solution a setting I should make in my web or  Spring configuration files or in eclipse?</p>
  
  <p>I’ve tried googling this but have not found a clear, definitve answer. I am very new to this and a detailed answer from you will be of great help.  </p>