title: Spring security: using relative path
body: <p>I have an application with name test.war.</p>
  
  <p>Because of Apache installed on my server I have to use another port number for Tomcat applications so after deployment this application available at domain.com:8080/test/.</p>
  
  <p>I decided to create a subdomain in order to remove that ugly 8080 from url, so I setted up the server like <a href="https://stackoverflow.com/questions/10200204/apache-subdomain-redirect-into-tomcat">described here</a>. So now test.domain.com reffers to domain.com:8080/test/.</p>
  
  <p>Everything seems fine except of one problem - because my application is not ROOT.war and I am using <code>spring:url</code> function every url in the application is translated to /test/bla-bla. So I removed that function. But still have a problem with spring security because it still translates an urls relative to app name i.e. /test/bla-bla.</p>
  
  <p>How can I solve that problem?</p>
  
  <p>Thank you</p>
  
  <p>UPD: I don't want to deploy it as a ROOT application because I have two or three such applications and I wanted to create a subdomain for each one of them</p>