With Struts 1.1, we have support for both error messages and non-error messages. We use saveMessages() for non-error and saveErrors() for error messages. In our JSPs, we can use the <html:messages> tag to display them:
<html:messages id="message" message="true"> <bean:write name="message"/><br> </html:messages> <html:messages id="error" message="false"> <bean:write name="error"/><br> </html:messages> The <html:messages> tag gives <bean:write> access to the individual messages (you can specify a property name for more specific messages). To differentiate error and non-error messages, you set the "message" attribute. It defaults to false (IIRC), so <html:messages id="error"> ... </html:messages> will iterate through the error messages. Hope that didn't get you even more confused. =) - Hubert --- "Slattery, Tim - BLS" <[EMAIL PROTECTED]> wrote: > I'm still trying to figure out the new method for reporting errors to the > user. We create an ActionMessage (instead of an ActionError), we add that > to an ActionMessages object (instead of ActionErrors) and we use > <html:messages...> in the JSP instead of <html:errors...>. Right so far? > > In the javadoc for the Action object, it shows a saveMessages method. The > description says: > > Save the specified messages keys into the appropriate request attribute for > use by the <html:messages> tag (if messages="true" is set), if any messages > are required. Otherwise, ensure that the request attribute is not created. > > What's this about "messages=true"? Where does that get set? > > -- > Tim Slattery > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]