I'm wondering if this is a bug or is my understanding of the html:errors incorrect. With no other errors but the global error that caused the redirect (as specified in global-exception) the output of <html:errors/> is
error.header error.prefix error.suffix error.footer With no error message between prefix and suffix even though an error message exists. I would think the functionality expected would be to either print the global error message, or, if <html:errors/> should just be for validation errors, it should not print the errors.header etc. Does that make sense? (See below for more info). Is this a bug, or is my understanding of <html:errors/> incorrect. ---------- Forwarded Message ---------- Subject: Excluding global errors from <html:errors> Date: Tue, 1 Mar 2005 05:37 pm From: Adam Jenkins <[EMAIL PROTECTED]> To: [email protected] Hi Guys, I'm trying to come to terms with <html:errors/>...it's working ok, I'm using the following for prefixes etc: #error formatting information errors.header=<font color="red"><center><p>Some errors occured validating the form. Please correct the following errors and try again.</p></center><ul> errors.footer=</ul></font> errors.prefix=<li> errors.suffix=</li> Which is working great when there are form validation errors, however, to get to the page that has the form, I use a global exception redirect as such: <exception key="mysite.globalerrors.database_config" path="/private/install/ConfigDB.jsp" scope="request" type="com.mysite.utils.DBMissingConfigDataException"/> And a tostring on org.apache.struts.action.ERROR = {mysite.globalerrors.database_config=[mysite.globalerrors.database_config[The site is not configured correctly: Required database configuration data was missing.]]} Now this is all well and good, except my <html:errors/> tag now prints out the header, and footer with one prefix and suffix in between (and no error message) when the page first loads (from the error redirect). When there is form validation errors everything works fine, however it's just that initial redirect where everything goes haywire. Does anyone know what's going on and/or how to fix? Cheers adam --------------------------------------------------------------------- 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]
