This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Find requested source form" Watch "Find requested source form" New topic
Author

Find requested source form

Prasad Babu
Ranch Hand

Joined: Jul 17, 2005
Posts: 57
Hi,

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.
Prasad
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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: http://aspose.com/file-tools
 
subject: Find requested source form
 
Similar Threads
Loading multiple forms in single jsp
Multiple form with one action
How to merge two forms in a single jsp
Need Help with JSP & Servlet
Encrypting URL in Address Bar