title: JSF change relative path of resources of login via Spring security
body: <p>Our application is a Jee application includes the following technologies:</p>
  <ul>
  <li>Spring</li>
  <li>Spring Security</li>
  <li>JSF 2.2</li>
  <li>Spring Webflow</li>
  <li>Spring MVC</li>
  </ul>
  <p>Before login , Resources (images,css,js,..) have been loaded successfully :</p>
  <pre><code>&lt;link href=&quot;/titi/javax.faces.resource/layout/layout.css.xhtml?ln=primefaces&amp;amp;v=5.1&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; /&gt;
  &lt;script src=&quot;/titi/javax.faces.resource/primefaces.js.xhtml?ln=primefaces&amp;amp;v=5.1&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  </code></pre>
  <p>After Login ,  relative paths rendering was changed :</p>
  <ol>
  <li>There is a new folder in the path which is <code>/apps/</code> .</li>
  <li>There is no <code>.xhtml</code> as extension .</li>
  </ol>
  <p>__</p>
  <pre><code> &lt;link href=&quot;/titi/apps/javax.faces.resource/layout/layout.css?ln=primefaces&amp;amp;v=5.1&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; /&gt;
  
  
  &lt;script src=&quot;/titi/apps/javax.faces.resource/primefaces.js?ln=primefaces&amp;amp;v=5.1&quot; type=&quot;text/javascript&quot; &gt;&lt;/script&gt;
  </code></pre>
  <p>What is the configuration should be added for Spring Security to  not  interfere in resources path ?</p>
  <h1>Why <code>/apps/</code> ?</h1>
  <p>I search on my code to understand why <code>apps</code> , i note that <code>apps</code> token from <code>web.xml</code> :</p>
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Spring MVC Dispatcher Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/apps/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>