title: spring security error in console and restricted folder is not working
body: <p>Question 1:</p>
  
  <p>i have set up spring security in my application but now i have a little weird problem.
  what i have learned from spring security is, you dont need to add this line of code <code>@RolesAllowed({"ROLE_ADMIN"})</code> above your method if you set this up </p>
  
  <pre><code>&lt;sec:http auto-config="true" access-denied-page="/faces/accessDenied.xhtml"&gt;
      &lt;sec:form-login login-page="/faces/login.xhtml" /&gt;
      &lt;sec:intercept-url pattern="/faces/admin/**" access="ROLE_ADMIN" /&gt;
  &lt;/sec:http&gt;
  </code></pre>
  
  <p>but apparently i can go to the page that is in the "/faces/admin" folder without spring security redirects me to the login page.</p>
  
  <p>Question 2:</p>
  
  <p>When i have the <code>@RolesAllowed({"ROLE_ADMIN"})</code> code above my method, it redirects me to the login page and works correctly but with this one, i got access denied error in my console with bunch of error codes (application still runs correctly though). is it OK that i get access denied errors in the console or if not what is the best way to handle it ? </p>
  
  <p>i still want to have the restricted pages folder and do not have to write <code>@RolesAllowed</code> above all the methods that are in the admin folder.</p>
  
  <p>PS: it is a JSF 2.0 project.</p>
  
  <p>thanks in advance, cheers.</p>