title: Apache Shiro anon filter not working
body: <p>I have a project where I am trying to use Apache Shiro to implement a security layer.  For the most part it seems to be working rather nicely.  I have been using the "authc" filter up to this point and that has been working as expected.  However, I'd like to move the login.jsp to a different public folder that doesn't have any stringent security requirements.</p>
  
  <p>Below is the relevant shiro.ini file entries.</p>
  
  <pre><code>shiro.loginUrl = /public/pages/login.jsp
  
  jdbcRealm = ...
  :
  :
  
  ds = ...
  :
  :
  jdbcRealm.dataSource = $ds
  
  [users]
  [roles]
  [urls]
  /public/**  = anon
  /secure/**  = authc
  /logout     = logout
  </code></pre>
  
  <p>When the /public/** = authc or anon, I can try to go directly to a page under the /secure URL and will correctly be taken to the login.jsp page.  Check. Check.</p>
  
  <p>After filling in the Username and Password on the login.jsp page and submitting the form, things break down...</p>
  
  <p>If <code>/public/** = authc</code>, then I'm taken to the original page I was attempting to get to in the /secure url.  So that works.</p>
  
  <p>If <code>/public/** = anon</code>, then the login.jsp will be reloaded.  I'm not sent to the page in the /secure directory I was originally attempting to get to.  The same thing occurs if I don't put an entry for the <code>/public/**</code> URL pattern.</p>
  
  <p>There seems to be some Shiro fundamental that I am missing.  If you need to see anything else in the project, I have uploaded it to BitBucket here.</p>
  
  <p><a href="https://tfeinstein@bitbucket.org/tfeinstein/vikos.git" rel="nofollow">https://tfeinstein@bitbucket.org/tfeinstein/vikos.git</a></p>
  
  <p>Thanks,
  Todd</p>