Throwing custom error messages in java struts -


are there useful patterns or best practices throwing/showing user friendly error messages in struts 1?

if(something nasty...) {     throw new userexception("very bad thing happened"); } else if(something other nasty...) {     throw new userexception("other thing happened"); } .... other 100 cases 

because using above sample in validate() method on , on again seems bit redundant , unprofessional.

create actionmessage(s) , display these. there better information here can give you: http://www.mkyong.com/struts/struts-logic-messages-present-logic-messages-notpresent-example/


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -