title: where should we place HIDDEN variable in JSP
body: <p>I need to use hidden variables in my JSP for session tracking. This is the code:</p>
  
  <pre><code>&lt;input type="hidden" name="REQ_TOKEN" value="&lt;%=session.getAttribute("SESN_TOKEN").toString()%&gt;" /&gt;
  </code></pre>
  
  <p>I am using this to compare the request token with session token, so only when both are equal I will evaluate that request otherwise I will throw an error.</p>
  
  <p>Now the problem is, when I place this code inside <code>&lt;form&gt;&lt;/form&gt;</code> tags, it is working fine. Unfortunately there are some JSPs in my application where we dont have <code>&lt;form&gt;</code> tag (I know that sounds weird!). Where can I place my code so that it will work?</p>
  
  <p>Can't i use Hidden variables without <code>&lt;form&gt;</code> tag?</p>