Hi Mohan You can have one action form and one action class for different JSP pages.But it would be a good design if all the JSP pages represent one type of function in your application. A typical example would be a Registration Module. Registration requires say around 2-3 JSP pages one after the other. In this case you can have action form say RegistrationForm.java and one Action class called RegistrationAction.java. You can do the following in the struts-config.xml for such
<form-bean name="registrationForm" type="somepackage.webapp.RegistrationForm"> for the form-bean declaration and <action path="/action/register" type="somepackage.webapp.RegistrationAction" name="registrationForm" scope="session" validate="false" > <forward name="input1" path="/forms/some1.jsp"/> <forward name="input2" path="/forms/some2.jsp"/> <forward name="success" path="/forms/some3.jsp"/> </action> for the action mappings part. You can have conditions in the Action class to take you to the respective jsp page upon validation of each page. -Good luck Mohan >> Hi, >> >> I am new to Struts and I have to complete a project with an aggressive >> deadline. I want to know the following: >> >> My application will have about 80-100 screens each having different >> action items. Most screens will have a common header, footer, and a >> navbar. My questions are: >> >> I thought of using Tiles for my application. Is that a good idea. >> - Should I have to have one action form for each screen or can I group >> the screens and have one action form for a group of screens. Which >> would be a preferred method? >> - Should I have to have one action class for each screen or can I >> group the action classes the same way as forms? Which would be a >> preferred method? >> - Every screen of mine is going to be a jsp page. I want to populate >> the form data at the time when someone enters the page from another >> page and I want to write the data into the database at the time when >> the user leaves a page with an action. Is this possible in the same >> action class? How does the flow work? Does the control go to the >> action class first before the form data is picked up for display. If >> that is the case, will there be an easy way for me to set the form >> data from the same action class for the form before the data is >> displayed? Where can I see a sample code if I use one single action >> class for loading the data and for processing the actions within the >> form? What should be the setting within the struts-config file for the >> above scenario. >> >> Sorry, if my questions are dumb. I need help. >> >> Thanks in advance, >> Mohan >> > > --------------------------------------------------------------------- To > unsubscribe, e-mail: [EMAIL PROTECTED] For > additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]