title: Setting value of a s:hidden in javascript
body: <p>I have a JSP with HTML input fields like <code>"username"</code>. I have a JavaScript method where I get the value of this field using `document.getElementById('userId').value.</p>
  
  <p>Now I have a struts2 tag: <code>&lt;s:hidden name="username" /&gt;</code></p>
  
  <p>In my JavaScript, before submitting, I need to set the value from the input text field to the Struts 2 hidden tag field. I cannot use the text directly from the input field and I need to set it to the hidden Struts 2 tag.</p>