Typically you use the <html:errors /> tag (thats struts 1.0x) to display all the errors that YOU saved in the action (saveErrors call..). There's a more detailed error/messaging scheme in struts 1.1 that I have yet to bite the bullet to learn :).
hth Billy Ng wrote: > Would you please tell me how did you get the errors in the Action? Is > there a method to call? > > Thanks! > > Billy Ng > >> From: "Martin Cooper" <[EMAIL PROTECTED]> >> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> >> Subject: RE: Unable to return error to jsp page >> Date: Wed, 14 Aug 2002 16:05:23 -0700 >> >> >> >> > -----Original Message----- >> > From: [EMAIL PROTECTED] >> > [mailto:[EMAIL PROTECTED]] >> > Sent: Wednesday, August 14, 2002 1:50 PM >> > To: [EMAIL PROTECTED] >> > Subject: Unable to return error to jsp page >> > >> > >> > Hi, >> > >> > I'm stuck... getting an error when the controller servlet is trying to >> > return my error to the jsp which issued the request. >> >> The controller did successfully hand off to your JSP page - it was the >> execution of the page that failed. It looks like your page needs a bean >> (poInfoList) in request scope to populate it, and you didn't >> create/store >> that in your action. >> >> -- >> Martin Cooper >> >> >> > I am >> > returning the >> > error directly from my Action servlet: >> > >> > System.out.println("Saving errors..."); >> > saveErrors(request,errors); >> > System.out.println("Returning to: " + mapping.getInput()); >> > return new ActionForward(mapping.getInput()); >> > >> > >> > My action mapping: >> > >> > <action path="/viewPODocument" >> > type="com.canopyint.app.rsvp.actions.PODocumentViewAction" >> > input="/listPOInfo.jsp" >> > name="poDocumentForm" >> > scope="request"> >> > <forward name="success" path="/PODocumentView"/> >> > </action> >> > >> > Form beans: >> > >> > <form-beans> >> > <form-bean name="userProfileForm" type >> > ="com.canopyint.app.rsvp.entity.UserProfile"/> >> > <form-bean name="poDocumentForm" type >> > ="com.canopyint.app.rsvp.entity.PODocument"/> >> > <form-bean name="poInfoListForm" type >> > ="com.canopyint.app.rsvp.entity.POInfo"/> >> > </form-beans> >> > >> > Error message: >> > >> > javax.servlet.jsp.JspException: Cannot find bean poInfoList in scope >> > request >> > at >> > org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag >> > .java:149) >> > at org.apache.jsp._0002flistPOInfo_jsp._jspService >> > (_0002flistPOInfo_jsp.java:112) >> > at >> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >> > at >> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service >> > (JspServlet.java:201) >> > at >> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet >> > .java:381) >> > at >> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >> > at >> > org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat >> ionDispatcher.java:679) >> > at >> > org.apache.catalina.core.ApplicationDispatcher.doForward(Appli >> cationDispatcher.java:431) >> > at >> > org.apache.catalina.core.ApplicationDispatcher.forward(Applica >> tionDispatcher.java:355) >> > at >> > org.apache.struts.action.ActionServlet.processActionForward(Ac >> tionServlet.java:1758) >> > at >> > org.apache.struts.action.ActionServlet.process(ActionServlet.j >> > ava:1595) >> > at >> > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >> > >> > Thanks for your help. >> > >> > >> > -- >> > 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]> >> > > > > > _________________________________________________________________ > Join the worlds largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > > -- > 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]>

