Hi Mike,
when you say "my servlet" - you presumably mean your action object? It's 
not a servlet. Anyway, I can't really see anything wrong with your xml. 
I was thrown a bit by the way you changed the default ".do" servlet 
mapping to "/do/", but that can't have anything to do with it. I would 
change the name of the forms to differentiate them from the names of 
their classes - normally by having lower case letters at the beginning, 
e.g. arvarianceReportForm - but again I can't imagine that would help.

What you can try is to destroy the first form before you return from the 
Action.execute/perform() - this should make sure that the FroeselReport 
page doesn't have the Variance ReportForm at all. Try it - but if it 
works, someone else will have to tell you why!

Adam



[EMAIL PROTECTED] wrote:

>Thanks for responding Adam.  Here are the pertinent entries from the
>struts-config.  I'll use the real names here so that I don't mistranslate
>something.  action A is the variance report and action B is the Froesel
>report:
>
>I have 2 form beans:
>
>    <!-- Variance report -->
>    <form-bean name="ARVarianceReportForm"
>type="com.omnicare.ar.araging.webapp.ARVarianceReportForm" />
>    <!-- Froesel report -->
>    <form-bean name="ARFroeselReportForm"
>type="com.omnicare.ar.araging.webapp.ARFroeselReportForm" />
>
>Then I have 2 global forwards:
>
>    <forward name="varianceReport" path="/do/varianceReport" />
>    <forward name="froeselReport" path="/do/froeselReport" />
>
>Finally, I have 4 actions (2 for initialization and 2 for the submit):
>
>    <!-- Show the variance report selection -->
>    <action path="/varianceReport"
>        name="ARVarianceReportForm" 
>        type="com.omnicare.ar.araging.webapp.ARVarianceReportAction"
>        scope="request"
>        validate="false"
>        input="/pages/variance_report_select.jsp"
>        parameter="reportselect">
>      <forward name="success" path="/pages/variance_report_select.jsp" />
>    </action>
>
>    <!-- Run variance report program -->
>    <action path="/runVarianceReport" 
>        name="ARVarianceReportForm"
>        type="com.omnicare.ar.araging.webapp.ARVarianceReportAction"
>        scope="request"
>        validate="false"
>        input="/pages/variance_report_select.jsp"
>        parameter="runreport">
>      <forward name="success" path="/pages/AR_aging_report.jsp" />
>    </action>
>
>    <!-- Show the Froesel report selection -->
>    <action path="/froeselReport"
>        name="ARFroeselReportForm" 
>        type="com.omnicare.ar.araging.webapp.ARFroeselReportAction"
>        scope="request"
>        validate="false"
>        input="/pages/froesel_report_select.jsp"
>        parameter="reportselect">
>      <forward name="success" path="/pages/froesel_report_select.jsp" />
>    </action>
>
>    <!-- Run Froesel report program -->
>    <action path="/runFroeselReport" 
>        name="ARFroeselReportForm"
>        type="com.omnicare.ar.araging.webapp.ARFroeselReportAction"
>        scope="request"
>        validate="false"
>        input="/pages/froesel_report_select.jsp"
>        parameter="runreport">
>      <forward name="success" path="/pages/AR_aging_report.jsp" />
>    </action>
>
>Last, but not least, I run the froesel report form using the code in my java
>servlet:
>
>    switch (requestNum) {
>        case 0:
>            servlet.log("Running variance report");
>            return (mapping.findForward("varianceReport"));
>        case 1:
>            servlet.log("Running froesel report");
>            return (mapping.findForward("froeselReport"));
>        default:
>            servlet.log("Could not find a report program");
>    }
>
>Mike
>
>-----Original Message-----
>From: Adam Hardy [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, June 05, 2002 2:11 AM
>To: Struts Users Mailing List
>Subject: Re: 2 problems that are just driving me CRAZY
>
>
>Hi Mike
>the first problem: how are you forwarding to ActionB from ActionA? Have 
>you got a forward element to ActionB in your ActionMapping for ActionA 
>set up in your struts-config, i.e.
>
>  <action-mappings>
>    <action    path="/myactiona"
>               type="ActionA"
>               name="FormA"
>              scope="request"
>           validate="true"
>              input="/actiona.jsp">
>      <forward name="do_actionb"       path="/myactionb.do"/>
>    </action>
>
>
>[EMAIL PROTECTED] wrote:
>
>  
>
>>Hi,
>>
>>I'm having two problems which are sure to drive me out of my mind if I
>>    
>>
>don't
>  
>
>>find the solution soon.  If you can help with either one of these, I would
>>appreciate it.
>>
>>1) For my problem, let's say I have 2 actions with 2 forms called ActionA,
>>ActionB, FormA, and FormB.  ActionA is going to use FormA and ActionB is
>>going to use FormB.  But, for some reason, the jsp which displays FormB
>>actually tries to display FormA.  I know this because FormA has an
>>    
>>
>attribute
>  
>
>>called transactionMonth and FormB has an attribute called monthSelection.
>>When I try to run this, I get an exception which tells me that there is no
>>getter for monthSelection.  However, if I go into my jsp and change it to
>>transactionMonth (from Form A), it works without a hitch.  ActionB does get
>>FormB though.  I know this because if I do a "servlet.log(form);" in
>>ActionB, I get the full pathname for FormB.  This problem occurs when I
>>forward to ActionB/FormB (not when I do a submit, I haven't tried that
>>    
>>
>yet).
>  
>
>>2) My second problem I've had trouble with longer.  It has to do with
>>ActionErrors and using the <html:errors/> tag.  In one branch of my webapp,
>>this works just fine.  But, for no reason that I can see, along another
>>branch of my webapp, the error message is not displayed.  I do the exact
>>same thing in both cases: I detect an error, add it to the errors
>>collection, do a SaveErrors method call, and forward using getInput().  In
>>both cases, the input form is re-displayed, but in one case the error
>>message is displayed and in the other case it's not.  The only other
>>discrepency that I see, which is also annoying, is that in the case where
>>the error does display, the input fields get cleared and they are all
>>    
>>
>blank.
>  
>
>>In the case where the error message is not dispalyed, the input fields
>>contain the values which were entered prior to the submit.
>>
>>Thanks for your help,
>>
>>Mike Witt
>>
>>--
>>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]>
>
>--
>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]>

Reply via email to