• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Struts + Error Message Display

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Subject: Display error messages (Validation errors) using Struts validation frame work.
Problem: I plan to display input validation errors using struts frame work. the problem is, with this frame work all errors are displayed at the top of the page (JSP). But say there are ten feilds, HOW WOULD I DISPLAY VALIDATION ERROR AT THE LOACTION OF THE ERROR FEILD RATHER THEN AT THE TOP OF THE PAGE.
Thank you.
 
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error displaying features in JSP/Struts are quite flexible. When adding an ActionMessage to your ActionErrors, specify a key that is unique to that field, then pick it up on the JSP side with a logic:messagesPresent name='theKeyYouSpecified' tag ie:

*or any other Sai P Kumar approved user unfriendly error message
ps: don't yell, it's not our fault if you don't read the documentation
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic