title: HTTP Status 403 - Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'
body: <p>I am getting the error 
  HTTP Status 403 - Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'
  when I click on the login button.
  The HTML file is as follows. Any help will be appreciated.</p>
  
     
  
  <pre><code>&lt;%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %&gt;
  
  &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /&gt;
  &lt;title&gt;Login page&lt;/title&gt;
  &lt;style&gt;
  .error {
      color: red;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;Login page&lt;/h1&gt;
  
  &lt;p&gt;
  &lt;c:if test="${error == true}"&gt;
      &lt;b class="error"&gt;Invalid login or password.&lt;/b&gt;
  &lt;/c:if&gt;
  &lt;/p&gt;
  
  &lt;form method="post" action="&lt;c:url value='j_spring_security_check'/&gt;" &gt;
  &lt;table&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;Login:&lt;/td&gt;
  &lt;td&gt;&lt;input type="text" name="j_username" id="j_username"size="30" maxlength="40"  /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Password:&lt;/td&gt;
  &lt;td&gt;&lt;input type="password" name="j_password" id="j_password" size="30" maxlength="32" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input type="submit" value="Login" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/form&gt; 
  
  &lt;p&gt;
  &lt;a href="${pageContext.request.contextPath}/index.html"&gt;Home page&lt;/a&gt;&lt;br/&gt;
  &lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>