Ok, thank you. I'll study the source in more detail. 

Kind Regards,

Rune Bjørnstad.

On Tue, 26 Aug 2003, Yansheng Lin wrote:

> The example uses doForward().
> 
> And the log explains it clearly that it's forwarding the request:
> 
> > > > > Validation failed, returning to '/registration.jsp' Delegating via 
> > > > > forward to '/registration.jsp'
> ...
> > > > >   doForward(uri, request, response);
> 
> Also, just before the doForward, the error was added to the request
> 
> > > > >   request.setAttribute(Globals.ERROR_KEY, errors);
> 
> That's why you can see the error.
> 
> 
> 
> -----Original Message-----
> From: Rune Peter Bjørnstad [mailto:[EMAIL PROTECTED] 
> Sent: August 26, 2003 12:01 PM
> To: Struts Users Mailing List
> Subject: RE: RE : Validation failes and returns (almost) empty page.
> 
> 
> Thanks for your answer, but isn't that just the oposite of what happens 
> in the example application? There the input is an absolute path, and still 
> the errors are displayed... or should I just keep my day job? ;)
> 
> Kind Regards
> 
> Rune Bjørnstad.
> 
> On Tue, 26 Aug 2003, Yansheng Lin wrote:
> 
> > Forward retains your request arguments(i.e., actionErrors), while an absolute
> > url submits an entirely new request(i.e., without any actionErrors).
> > 
> > 
> > -----Original Message-----
> > From: Rune Peter Bjørnstad [mailto:[EMAIL PROTECTED] 
> > Sent: August 26, 2003 5:29 AM
> > To: Struts Users Mailing List
> > Subject: Re: RE : Validation failes and returns (almost) empty page.
> > 
> > 
> > Glad to help. The world now has atleast two less frustrated men walking 
> > about.. ;)
> > 
> > Rune.
> > 
> > On Tue, 26 Aug 2003, thomas Sontheimer wrote:
> > 
> > > I had the same problem and your "solution" works.
> > > 
> > > thank you
> > > 
> > > thomas
> > > 
> > > > -----Original Message-----
> > > > From: Rune Peter Bjørnstad [mailto:[EMAIL PROTECTED] 
> > > > Sent: Tuesday, August 26, 2003 11:46 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Validation failes and returns (almost) empty page.
> > > > 
> > > > 
> > > > 
> > > > I found the "solution" to my problem. Instead of specifying 
> > > > an absolute 
> > > > JSP as my input attribute (struts-config.xml), I specified a 
> > > > forward name. 
> > > > Now it works perfectly. Still don't know why it works in the example 
> > > > application.
> > > > 
> > > > Rune.
> > > > 
> > > > 
> > > > On Tue, 26 Aug 2003, Rune Peter Bjørnstad wrote:
> > > > 
> > > > > On Tue, 26 Aug 2003, Rune Peter Bjørnstad wrote:
> > > > > 
> > > > > I've compared the logfiles of my application and the 
> > > > validator example
> > > > > application in the case of a failed validation. 
> > > > > 
> > > > > - In my case, the situation described in my previous mail occurs.
> > > > > - In the example application, the following messages are logged:
> > > > > 
> > > > > Validation failed, returning to '/registration.jsp' Delegating via 
> > > > > forward to '/registration.jsp'
> > > > > 
> > > > > The second message I do not get in my application. examining the 
> > > > > source
> > > > > ResourceProcessor.java reveals:
> > > > > 
> > > > >   // Save our error messages and return to the input form 
> > > > if possible
> > > > >   if (log.isDebugEnabled()) {
> > > > >     log.debug(" Validation failed, returning to '" + input + "'");
> > > > >   }
> > > > >   request.setAttribute(Globals.ERROR_KEY, errors);
> > > > > 
> > > > >   if (moduleConfig.getControllerConfig().getInputForward()) {
> > > > >     ForwardConfig forward = mapping.findForward(input);
> > > > >     processForwardConfig( request, response, forward);
> > > > >   } else {
> > > > >     internalModuleRelativeForward(input, request, response);
> > > > >   }
> > > > > 
> > > > > with:
> > > > > 
> > > > >   protected void internalModuleRelativeForward(
> > > > >     String uri,
> > > > >     HttpServletRequest request,
> > > > >     HttpServletResponse response)
> > > > >     throws IOException, ServletException {
> > > > >             
> > > > >     // Construct a request dispatcher for the specified path
> > > > >     uri = moduleConfig.getPrefix() + uri;
> > > > > 
> > > > >     // Delegate the processing of this request
> > > > >     // FIXME - exception handling?
> > > > >     if (log.isDebugEnabled()) {
> > > > >       log.debug(" Delegating via forward to '" + uri + "'");
> > > > >     }
> > > > >     doForward(uri, request, response);
> > > > >   }
> > > > > 
> > > > > This leads me to the conclusion that my application and the example
> > > > > application reacts differently to the boolean check:
> > > > > 
> > > > > moduleConfig.getControllerConfig().getInputForward()
> > > > > 
> > > > > Can anyone shed some light on this?
> > > > > 
> > > > > Kind regards,
> > > > > 
> > > > > Rune Bjørnstad
> > > > > 
> > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > I've got a bizarre problem regarding form validation. A 
> > > > simple form 
> > > > > > is
> > > > > > validated, and when failing this validation I get a blank 
> > > > html page with 
> > > > > > the following source: <html><body></body></html>
> > > > > > 
> > > > > > The last message in the log is:
> > > > > > 
> > > > > > Validation failed, returning to '/upload.jsp'
> > > > > > 
> > > > > > I've read in another thread that somone else experienced the same 
> > > > > > thing.
> > > > > > The solution in this case was to use a different 
> > > > commons-validation.jar.
> > > > > > 
> > > > > > I'm using exactly the same jars as the validation example 
> > > > > > application.
> > > > > > Still with the same result.
> > > > > > 
> > > > > > Why am I not receiving the original form, like in the validation 
> > > > > > example?
> > > > > > 
> > > > > > I've included the following files for review:
> > > > > > 
> > > > > > - upload.jsp // The file containing the html.
> > > > > > - web.xml
> > > > > > - struts-config.xml
> > > > > > - validation.xml
> > > > > > - UploadBean.java
> > > > > > 
> > > > > > Any help would be greatly appreciated!
> > > > > > 
> > > > > > Kind regards
> > > > > > 
> > > > > > Rune Bjørnstad
> > > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > ---------------------------------------------------------------------
> > > > > 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]
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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]
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to