• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to Render All and Individual Errors in One Page

Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My JSP need to report (1) all errors in one place and (2) individual form property's error at their specific location using <html:errors/>. I know a common way is first to add these into resource bundle:

errors.header=<p>Errors Encountered</p><font color=red><ol>

Then, I put one <html:errors/> at the top for list of all errors and <html:errors property="propertyname"/> next to each input element for the corresponding property.

Now with this approach, I have a problem where the headers/prefix got printed in my individual error list, too. I just want it be printed at the all error list at the top.

Is there any way to print the headers/prefix for <html:errors/> while leaving them out at each specific <html:errors property="..."/> tag?
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

u dont have such an option with struts 1.1 but after the release of struts 1.2 they had provided all these header,footer,prefix and all as the attributes for the error tag
    Bookmark Topic Watch Topic
  • New Topic