aspose file tools*
The moose likes Struts and the fly likes Can there be more than one form in a JSP in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Can there be more than one form in a JSP in struts" Watch "Can there be more than one form in a JSP in struts" New topic
Author

Can there be more than one form in a JSP in struts

Krishnan Dhamodharan
Greenhorn

Joined: Nov 01, 2004
Posts: 4
Hi,
Can there be more than one form in a JSP in struts. If so, how to provide the mappings for each of them in the struts-config.xml


Dhamodharan Krishnan,<br />Analyst,<br />Verizon Data Services India (P) Ltd.<br />Chennai, India.
Ludovic Leb�gue
Greenhorn

Joined: Nov 08, 2004
Posts: 2
I don't think it's possible. I'm not even sure why you need to do that.
If you want to process different datas you need different struts actions and thus different mappings in Struts-config.
Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
Originally posted by Krishnan Dhamodharan:
Hi,
Can there be more than one form in a JSP in struts. If so, how to provide the mappings for each of them in the struts-config.xml


You can actually access or work with more than one form bean in a view (JSP), one would be the form associated with the action being processed and the others could be any other form bean in session scope. However when specifying the action mapping, you only specify one form bean which will be mapped to your view (JSP).

You would not normally need to access data from multiple forms in a single view, your design usually decides that.

Sheldon Fernandes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can there be more than one form in a JSP in struts
 
Similar Threads
Defining form bean in 1 struts-config and action in another struts-config..
How to name html:form tag in sturts
from submission
Defining form bean in 1 struts-config and action in another struts-config..
Multiple Action Class for single form bean and single JSP