• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

getting the form name

How can I get the name of a form that posts to a JSP, or Servlet ?
Thanks.
0
simi
Asked:
simi
  • 2
1 Solution
 
pellepCommented:
Short answer, you can't. The name of the form is not submitted in the HTTP protocol, regardless of wheather you do POST or GET. You'll have to add the name of the form as a hidden input field in the form.
0
 
simiAuthor Commented:
Thanks.
I thought of the solution with the hidden form.
However I was wondering if I am just creating a redundant variable.
Weird, why do they allow you to have a name attribute for the form, when you can't use it.
0
 
pellepCommented:
Well, the name is useful if you intend to use javascript for any dynamic feature on your page.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now