Printing a Stack Trace to the Server Console : Try Catch « JSP « Java






Printing a Stack Trace to the Server Console

<HTML>
    <HEAD>
        <TITLE>Printing a Stack Trace to the Server Console</TITLE>
    </HEAD>

    <BODY>
        <H1>Printing a Stack Trace to the Server Console</H1>
        <%
            try{
                int value = 1;
                value = value / 0;
            }
            catch (Exception e){
                e.printStackTrace();
            }
        %>
    </BODY>
</HTML>

           
       








Related examples in the same category

1.Using a try/catch Block
2.Nesting try/catch Statements
3.Multiple Catch