Reputation: 331
<form name="GetAll"
method="post"
action="NewServlet">
<input type="text" name="des">
<input type="submit">
</form>
How I can get name of this form (GetAll
) in my NewServlet
servlet?
Upvotes: 0
Views: 779
Reputation: 57
The name attribute of the form is not part of the HTTP request when it is submitted. You could add a hidden field instead to identify multiple forms off same page like
<input type="hidden" name="formName" value="formA">
keeping the name attribute of the hidden input same of course.
Upvotes: 2