You may be confusing Actions with action-mappings. Each JSP can have its own action-mapping, and own input settings, and the rest of it, and all the action-mappings can share the same Action.
Of course, action-mappings can also share JSPs, and so forth. There are no 1:1's here. -T. Rick Reumann wrote: > > Sorry James, I don't think I described the situation to well and I'm > sure there probably is a better way to handle this... > > Easiest way is an extreme example.. > > What if you had 4 different JSPs that captured the same information in > a form YET everything else on the page was radically different. Upon > submission, though, you want to forward all the pages to the same > Action and even possibly forward all of them to the same results page. > > The problem(I think) is you also want to validate the form > information. I'm wondering how you would get the validation to know to > return back to the correct JSP page if there were validation errors? > > I thought you needed to provide the input="yourJsp.jsp" so that it > knew were to go back to, but if all 4 jsps shared this action mapping > what would you put in the input="?" section? (maybe I'm totally wrong > and the validation doesn't need that but I thought it did). > > Thanks for the help, > Rick > > On Wednesday, June 12, 2002, 3:43:18 PM, James wrote: > > JM> Not sure why you are submitting a form from diff jsp, but one work > JM> around might be to forward to a known jsp.... > > JM> I'm guessing that you are passing something to the action to tell it where > JM> you came from...... > > JM> <!-- Save mail subscription --> > JM> <action path="/saveSubscription" > JM> type="org.apache.struts.webapp.example.SaveSubscriptionAction" > JM> name="subscriptionForm" > JM> scope="request" > JM> input="/WEB-INF/jsp/subscription.jsp"> > JM> <forward name="success" path="/editRegistration.do?action=Edit"/> > > JM> <forward name="fail-jsp1" path="/jsp1.jsp"/> > JM> <forward name="fail-jsp2" path="/jsp2.jsp"/> > JM> <forward name="fail-jsp3" path="/jsp3.jsp"/> > > JM> <!-- or you might use a different exception --> > JM> <exception > JM> key="failure.reason1" > JM> type="org.apache.struts.webapp.exception.Reason1" > JM> path="/jsp1.jsp"/> > > JM> </action> > > JM> I didn't actually run this.....so.....hope it gives you some ideas. > > JM> James Mitchell > JM> Software Engineer\Struts Evangelist > JM> Struts-Atlanta, the "Open Minded Developer Network" > JM> http://struts-atlanta.open-tools.org > > >> -----Original Message----- > >> From: Rick Reumann [mailto:[EMAIL PROTECTED]] > >> Sent: Wednesday, June 12, 2002 3:31 PM > >> To: Struts List > >> Subject: If several JSs share the same action mapping...? > >> > >> > >> How to do you deal with the input="?" parameter when setting up an > >> action mapping that different JSPs will share? I thought this "input" > >> declaration was so if you are using validation it knows which page to > >> return to with the validation errors. How is this accomplished when > >> you have different JSPs that could share this action mapping but also > >> need to be validated and thus I think also require the input field to > >> be supplied? > >> > >> TIA > >> > >> -- > >> > >> Rick > >> mailto:[EMAIL PROTECTED] > >> > >> "Maybe in order to understand mankind, we have to look at the word > >> itself: 'Mankind'. Basically, it's made up of two separate words - > >> 'mank' and 'ind'. What do these words mean ? It's a mystery, and > >> that's why so is mankind." > >> -Jack Handey > >> > >> > >> -- > >> To unsubscribe, e-mail: > JM> <mailto:[EMAIL PROTECTED]> > JM> For additional commands, e-mail: > JM> <mailto:[EMAIL PROTECTED]> > > -- > > Rick > mailto:[EMAIL PROTECTED] > > "It's amazing to me that one of the world's most feared diseases would > be carried by one of the world's smallest animals: the real tiny dog." > -Jack Handey > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>