Home Jsp Simple-jsp-example Runtime Errors
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Runtime Errors

Advertisement
Errors are arised when there is any logic problem with the logic of the program. In this program we are trying to divide the number by zero which results in runtime error.

Runtime Errors

        

Errors are arised when there is any logic problem with the logic of the program. 

In this program we are trying to divide the number by zero which results in runtime error.

The code of the program is given below:

 

<HTML>
    <HEAD>
        <TITLE>Runtime Error in Jsp page</TITLE>
    </HEAD>
    <BODY>
	<table align="center" bgcolor="#E1E1FF" border="1">
        <H1>Runtime Error in Jsp page</H1>
        <%
		 try{
            int a = 10;
            int b = 10;
            b = a / 0;			}
        catch(Exception e){
            out.println("The answer is " + e);
		}
        %>
	</table>
    </BODY>
</HTML>

Output of the Program:

 

Download this example.

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: March 12, 2008

Ask Questions?    Discuss: Runtime Errors  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com