Can we handle multiple forms in struts application
In one jsp i will handle a form based on the input ,I must retrieve data and set it in another form class is it possible if so how
addResource.jsp
--
<html:form >
<html:text name="resourceForm" property="resourceId" />
</html:form>
In action class method
-
retrive resourceid based on that retrieve employee information
and need to set in another form for display is it possible
[457 byte] By [
mpramodka] at [2007-10-2 17:52:29]

ofcourse it is possible and quite simple, once the first form is posted to an action, populate the form class for the next form and forward the request to the second form jsp who uses the new populated form.
you can forward the request to a different action before redirecting to the second form, create another action like
<action path="/secondFormAction"
type=""
name="secondForm">
</action>
then in your resource form action
<action path="" name="resourceForm" >
<forward name="success" path="/secondFormAction.action"/>
</action>
the secondFormAction will create the form for you and u could put the data in request attribute and access it in the secondFormAction and then pupulate the data in the secondForm and then redirect the request to the second JSP.
hope you have got the point here, I wouldnt wont to paste anycode until you try it out.