Testing a new Spring MVC project in STS - Default Root Context?

I am trying to enter the world of Spring MVC, and I am starting with the SpringSource Tool Suite. I created a new Spring MVC project and I understand the basics. The quick question I have is the best way to change the root context of the default vFabric server that comes with STS?

By default, it matches my project with the name / projectname, but when I finally deploy this project, I want it to be in the root context of /. Is there a way to change this in STS / vFabric, so when I start on the server and it starts the Tomcat instance, the current project will be in the root context, and not on the default "VMware vFabric tc Server" page? This just makes testing the site difficult, as I will link to "/ mylink" (for example) in HTML, but when run in STS it will be / projectname / mylink

Thanks.

+4
source share
1 answer
  • In the Servers window, right-click on the vFabric server.
  • select "open"
  • In the editor that opens, click "Modules" (at the bottom of the editor window).
  • You will see the deployed applications, click the one that should be deployed in ROOT
  • click edit
  • change the path to "/", leave docbase as it is
  • save and execute
+8
source

Source: https://habr.com/ru/post/1432767/


All Articles