0

i have made a simple wepp app in struts2 that logs in and add user the log in and registration page are all running ok..but i had a problem when i registered the same email it was successful i wanted to add a simple error that when the email is already registered it may not be used again to register another user i found a couple of validation but it does not answer my question ideas on how to do this kind of validation is appreciated

this is a similar problem but it has no answer as well http://www.rqna.net/qna/ypywn-how-to-show-error-message-on-struts2-jquery-dialog-box.html

i read this one but i think its a different kind of validation http://struts.apache.org/release/2.2.x/docs/fielderror.html

  • 1
    Hi please chek the following link it may help. [http://stackoverflow.com/questions/20795421/ajax-error-struts2/20796174#20796174][1] [1]: http://stackoverflow.com/questions/20795421/ajax-error-struts2/20796174#20796174 – Prabhakar Manthena Jan 02 '14 at 10:23
  • 1
    See also [ActionError not getting displayed?](http://stackoverflow.com/a/20857030/573032). – Roman C Jan 02 '14 at 10:36
  • those are great sources but are there any way to show just a message on top or below that says "your email is already in use" something like this and doesnt need to use js or load another page?its a simple webb app as that.any ideas are appreciated thank you roman and prabhakar –  Jan 03 '14 at 02:33

1 Answers1

0

found a very simple solution to this i just put

addFieldError("email","user email already in use");

and it worked the way i wanted it to work