Okay here it is ..... <html:messages id="errorMessage" property="loginError"> <table> <td> what ever..... <bean:write name="errorMessage" /> </td> </table> </html:messages>
"loginError" is the properties you but it in your ActionErrors.put("loginError", new ActionError("whatever.key") ; read the html tag docs > -----Original Message----- > From: Schmidt, Carl [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, June 11, 2002 12:20 PM > To: 'Struts Users Mailing List' > Subject: RE: Formatting the error tag > > I'm not sure I understand. If I place the messages tag within the table in > the .jsp like so: > > <TABLE .....> > <TR><TD> > <html:messages/> > </TD></TR> > </TABLE> > > I don't see how the messages tag can in any way control whether or not the > table html is printed. Unless, you are implying that I'm to include the > html > for table in the resources file, perhaps as a header and footer? > > Carl > > > -----Original Message----- > From: Trieu, Danny [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 11, 2002 3:04 PM > To: 'Struts Users Mailing List' > Subject: RE: Formatting the error tag > > > no no .....use the html:message tag.... this should solve your problem > > > -----Original Message----- > > From: Schmidt, Carl [SMTP:[EMAIL PROTECTED]] > > Sent: Tuesday, June 11, 2002 12:01 PM > > To: Struts (E-mail) > > Subject: Formatting the error tag > > > > As part of formatting some validation error messages, I'm trying to > print > > out html:errors tag from within a single celled table. I only want the > > html > > for the table to be printed if errors are present. I tried the > > logic:present tag, which can print out the html if the error bean is > > present. The problem is that I have to know the name of the error bean, > > which for STRUTS is defined in Action.java. Needless to say I don't > want > > to > > hardcode this value into the logic tag. I've searched the archives > using > > "format error", "error display", "conditional display", etc. and came up > > with nothing. > > > > 1. Is there a way to get the name of the error bean without hardcoding > it > > directly onto the jsp? > > 2. Is there another solution, perhaps using another tag, which I've > > missed? > > > > Carl > > > > -- > > 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]> > > -- > 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]>