I have a simple Jsp page which contains HTML elements,as follows,
<tr id="tr-username">
<td>Username</td>
<td><input type="text" id="userName"/></td>
</tr>
I want to set the value of userName textbox to a session variable.How to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot directly set the value in the session variable from the rendered JSP . Once your form on jsp is submitted then at the servlet/controller you can do :