• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error message

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to use custom error messages for a form validation. I need to get displayed all messages for the fields that are kept blank.

I have done like this :

bean :




util class




jsp :





What I am trying to do is, when press the save button all the fields in the form should be validated and display error messages.
At the moment what I am getting is, when I press save button for the first time it will display message for the first field that kept blank(I need to get all messages for all fields that kept blank ) and then when I press save button second time page goes off with exception.

I am not sure where I am going wrong. Please help me .

Thanks,
Joe.
 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have modified the code like the following, but still getting error when I add one field and left the ohters blank.

bean :






util class







jsp :


I think there is some exception coming at message.getDetail().I cannot print that or it doesn't get printed.

Anyone has a thought whats going wrong here ? Please help.

Thanks,
Joe.
 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it sorted. There was some logical errors.
Thanks everyone who had a try.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic