• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Error Messages showed on the web pages !!!  RSS feed

 
YuenLian Wu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I am a new Java Web Developer. I am just curious at the Error Messages showed from the browser. FOr example, the "join member" form has a lot of parameters and the server side needs to validate all of them. Once the server found out the input value(s) are not valid, then it will add an error to the Custom Exception class. The code will be shown in the blow.





My question is the following. The Action program will throw this "Customed" Exception class when it contains more than one error message, however, how do this "Exception class" leads to the errors showed on the screen ? Those errors contains "Your email address is not valid !!!" Since it's a presentation layer stuff, I am not sure how does it works.

Thanks for answering my question

Transistor
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hm, that's not a advanced question, and not a general java question either...

assuming that you are working with a webframework (struts?) running in a servlet engine, the error handling mechanism is controled via the error-page jsp directive. the declared page jumps in whenever an exception rises.

no magic :-)

cheers,
jan
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!