John,

Yes. I prefer to do one validation in ActionClass and if the validation fails, 'am 
constructing ActionErros. Then, 'am saving it and using the input forward. I even 
tried using the "/" as I do for failure forward. But it doesnt seem to work.

Thats the reason, why I have to make a failure forward and have an extra line in 
struts-config.xml to direct the page back to the data entry page. Though it works, I 
wonder is this the right way to do that? Or, why is input forward doesnt work? 

Iam happy that atelast I have a work around.

But, in one of the screens I have the same problem where I let request processor to 
take care of the flow by defining my validations in ActionForm's validate method. It 
didnt seem to work. 

This is the action mapping for the other screen where requestprocessor fails to make 
an input forward when my ActionForm's validate method returns an ActionError.

<action    path="/changePrm"
           type="com.g1.interactive.webapp.ChangePrmAction"
           name="ChangePrmForm"
           scope="session"
           input="changePrmDocument.jsp"> // i tried with "/" too
</action>

Iam sure(by seeing the logs) ChangePrmForm is returning the ActionErrors object. But, 
the control(which ReqProc. should do) is NOT going back my input page. Instead, it 
takes me to a blank page.
I have html:errors in my input page and also have the right entry in my application 
resources file.

Any advise.

Thanks,
-Pani.

--

On Wed, 19 Feb 2003 10:58:42  
 John Espey wrote:
>I prefer the getInput method when doing validation, although under most
>circumstances the RequestProcessor will do that for you.  If you are doing
>input validation in the action class, then you should probably use the
>getInput method.  If not, you need the input forward to work anyways if
>validation fails (which it doesn't appear that you are validating for this
>mapping) when the RequestProcessor does its thing.
>
>Did you try doing input="/reportDoc.jsp"?  I suspect that it should work
>given that the failure forward uses the "/" (and you've said it works).
>
>> -----Original Message-----
>> From: Pani Ramasami [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, February 19, 2003 9:55 AM
>> To: Struts Users Mailing List
>> Subject: RE: return (mapping.getInputForward()); - not working
>>
>>
>> John,
>>
>>
>> --
>>
>> On Tue, 18 Feb 2003 19:56:43
>>  John Espey wrote:
>> >Pani,
>> >Can you copy your action mapping configuration (if your input is
>> an action
>> >can you copy  that one too?
>>
>> Here it is:
>>
>>     <action    path="/reportGen"
>>                type="com.g1.interactive.webapp.ReportGenAction"
>>                name="ReportGenerateForm"
>>                scope="session"
>>                input="reportDoc.jsp"> // i tried removing .jsp too
>>       <forward name="success"    path="/reportResultDoc.jsp"/>
>>       <forward name="failure"    path="/reportDoc.jsp"/>
>>     </action>
>>
>> forward failure is something which i added later so that i can avoid using
>>    return (mapping.getInputForward());
>> now, 'am using
>>    return (mapping.getActionForward("failure");
>> it seem to work. but, just wondering is the later one is the
>> right way to do? or the first one?
>>
>>
>> Thanks,
>> -Pani.
>>
>> >
>> >> -----Original Message-----
>> >> From: Becky Norum [mailto:[EMAIL PROTECTED]]
>> >> Sent: Tuesday, February 18, 2003 7:37 PM
>> >> To: [EMAIL PROTECTED]
>> >> Cc: [EMAIL PROTECTED]
>> >> Subject: Re: return (mapping.getInputForward()); - not working
>> >>
>> >>
>> >> Pani,
>> >>
>> >> You have to specify the forward name parameter, if you haven't.
>> >>
>> >> For example, if in struts-config.xml your forward is:
>> >>       <forward name="success" path="/home.jsp" />
>> >>
>> >> you have to use the following in your Action class:
>> >>        return (mapping.getActionForward("success");
>> >>
>> >> Best of luck,
>> >>
>> >> Becky
>> >>
>> >> --
>> >> Becky Norum <[EMAIL PROTECTED]>
>> >>
>> >> On Tue, 2003-02-18 at 19:23, Pani Ramasami wrote:
>> >> > Hi:
>> >> >
>> >> > The below line:
>> >> >
>> >> > return (mapping.getInputForward()); // (in the ActionClass)
>> >> >
>> >> > is not taking me back to the form specified in the input
>> >> attribute of stuts-config.xml
>> >> >
>> >> > Iam using <html:errors/> in my jsp to display the action errors
>> >> (if any).
>> >> >
>> >> > Any advise wud be greatly appreciated.
>> >> >
>> >> > -Pani.
>> >> >
>> >> >
>> >> >
>> >> > _____________________________________________________________
>> >> > Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
>> >> > http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > 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]
>> >>
>> >
>> >
>> >---------------------------------------------------------------------
>> >To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>>
>> _____________________________________________________________
>> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
>> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>


_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to