title: Not able to authenticate post request for CSRF token with tomcat
body: <p>I am working on a tomcat application. I am trying to add CSRF authentication token provided by catlina library(org.apache.catalina.filters.CsrfPrevention). I have added filter to web.xml
  </p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;CsrfFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.catalina.filters.CsrfPreventionFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;entryPoints&lt;/param-name&gt;
          &lt;param-value&gt;/Login&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;CsrfFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>Also I have updated the login.jsp</p>
  
  <pre><code>&lt;%  String url = '/Login?x=true';
      String encodeUrl = response.encode(url);
  %&gt;
      &lt;form action="&lt;%=urlEncode%" action="Post"&gt;
          &lt;input type="text" name="username"/&gt;
          &lt;input type="password" name="password"/&gt;
          &lt;button type="submit"&gt;Login&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>Now when I am running server login page is rendering. When I am entering username and password browser is sending Post request to Login servlet with CSRF_NONCE <em><a href="http://localhost:9090/Login?x=true&amp;org.apache.catalina.filters.CSRF_NONCE=7DE88A93A526E465566864684FEB01C9" rel="nofollow">http://localhost:9090/Login?x=true&amp;org.apache.catalina.filters.CSRF_NONCE=7DE88A93A526E465566864684FEB01C9</a></em>. Its having CSRF_NONCE but still response is having status 403. I have read many document but could not found any solution to authenticate post requet.</p>
  
  <p>I also reaad that i need to encode all the urls but could not found how should I need to do. Do I need to write filter for that?</p>