I am now using Struts 1.0. I know that I can use <html:error/> to display error message. However, I want to highlight the field which has error in the JSP page at the same time. Is there any function in Struts that I can do it? Thanks! Stephen Lee
In the ApplicationResources.properties you can define these properties errors.footer=<b> errors.header=</b> Or whatever html you want to wrap the errors in. If you want to have a bit more control (i.e. not the same everywhere) you can use a logic tag. <logic : present name=<%Action.ERROR_KEY%> property="yourError" > <b><html:errors property="yourError"/></b> </logic : present> The Action.ERROR_KEY is the default name that the ActionErrors bean is stored in by Struts. Hope this helps. Sean [ May 24, 2002: Message edited by: Sean MacLean ]
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth