Mega Code Archive

 
Categories / Java Tutorial / JSP
 

Output error message to console

< HTML>     <HEAD>         <TITLE>Building a simple error handling page.</TITLE>     </HEAD>     <BODY>         <%             try{                 int value = 1;                 value = value / 0;             }             catch (Exception e){                 System.out.println(e.getMessage());             }         %>     </BODY> </HTML>