I want to send values of my textfields of JSP/HTML page through URL like this:
<a href="some.jsp?uname=Somnath&dob=02/02/89&gender=male"></a>
But instead of static value I need to send the value which is putted currently.
Actually I want to receive the value of all fields by getParameter() method. But we can not use:
<form action="someAnother.jsp" method="post">
Because there is anothere URL attached with the form.Actual Situation is:
<form action="someAnother.jsp" method="post">
<input type='text' name='uname'/>
<input type='password' name='password'/>
<input type='text' name='dob'/>
<input type='text' name='contact'/>
<a href="some">
<input type='button' value='Upload Image'/>
</a>
<input type='submit' value='Register'/>
</form>
UploadImage Button call a servlet & make some operations and forward to this page again. And I need to fill all fields again which was filled by the user before hit the Upload Image Button.
So I think only way to get those values in that servlet is through URL.Please give me your suggestion.
- Remind that we can get all the field values in a JSP/Servlet only if we make the action through form tag & also remind the nested form is not allowed.
- So only way to call another servlet/jsp within a form tag again is a tag but it Carries no data with it.If i want to send some data with a tag then we have to use URL like firs Example.