• Post Reply Bookmark Topic Watch Topic
  • New Topic

error message  RSS feed

 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
I got it sorted. There was some logical errors.
Thanks everyone who had a try.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!