File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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: 14688

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
I agree. Here's the link:
subject: Find requested source form
It's not a secret anymore!