title: Spring mvc posting data to controller
body: <p>This is a question what I have been wondering for quite some time.
  Often enough I have my jsp which has to post some data to my controller. In this jsp I have some data I need to post to controller, but aren't touched by the user.. (ie, administration data like an ID). As far as I know there are 2 options to give the controller this data.</p>
  
  <ol>
  <li>Use <code>&lt;input type="hidden"&gt;</code> fields</li>
  <li>Put everything in a session variable.</li>
  </ol>
  
  <p>Option 2 has my preference since it requires me to type less code, and I can't forget hidden fields. Though this also has downsides, like another page overriding the session attribute.</p>
  
  <p>What are your preferences? And are there any other options?</p>
  
  <p>Thanks!
  Davey</p>