Two Laptop Bag*
The moose likes JSP and the fly likes Find requested source form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Find requested source form" Watch "Find requested source form" New topic

Find requested source form

Prasad Babu
Ranch Hand

Joined: Jul 17, 2005
Posts: 57

My scenario is,

I have one JSP which has two forms and the forms contains similar data. the submit action for the forms are the JSP itself. is there any way how to know from which form posted the data?

<form name="1" action="my.jsp">
<form name="2" action="my.jsp">

Thanks in advance.
Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

Insert a hidden tag in each, with a different value.
For example,
<input type="hidden" name="which" value="form1"/>
and another one for form2.

[My Blog]
All roads lead to JavaRanch
subject: Find requested source form
Similar Threads
How to merge two forms in a single jsp
Need Help with JSP & Servlet
Loading multiple forms in single jsp
Encrypting URL in Address Bar
Multiple form with one action