title: Is there any way to automatically rewrite URL's when you deploy a spring mvc project to tomcat?
body: <p>So I'm working with Spring MVC for the first time. 
  I've created an application using IntelliJ and everything works fine, but now I'm trying to deploy this application to tomcat.
  I've got the war file "myapplication.war" and when I deploy it to tomcat I can successfully surf to localhost:8080/myapplication . 
  On this page I've got a link to one of my controllers.</p>
  
  <pre><code>&lt;a href="/register"&gt;Register&lt;/a&gt;
  </code></pre>
  
  <p>Which redirects me to localhost:8080/register instead of localhost:8080/myapplication/register.
  If I change the URL myself it works fine.</p>
  
  <p>Is there any way to rewrite this URL automatically ? 
  I don't want to change all the URL in my project because then it will be impossible to run it from IntelliJ.</p>