0

I have a spring mvc web project developing on STS 3.1, lets name it MYPROJECT.

When I run it on Apache Tomcat 7, I have to type "http://localhost:8080/MYPROJECT" but I want it to run on the root "http://localhost:8080/" how can I set the deployment path to "/" instead of "/MYPROJECT"?

hevi
  • 2,432
  • 1
  • 32
  • 51

1 Answers1

1

You want to change the Context Root.

  1. Right click your project in Package Explorer
  2. Select 'Properties'
  3. Select 'Web Project Settings'
  4. Enter '/' (without quotes).

Next time you open your project, load the URL http://localhost:8080/

Note that in STS 3.2 (Mac OS X 3.6.8) I find I have to reset this option from time to time as it unexpectedly reverts to the project name.

gihrig
  • 51
  • 1
  • 10