Share on Google+Share on Google+

Throwing an Exception in JSTL

Advertisement
In this program we are going to show you what will happen if we try to divide any number by 0. After going through this example you can better understand how the exception can be thrown in JSTL.

Throwing an Exception in JSTL

        

In this program we are going to show you what will happen if we try to divide any number by 0. After going through this example you can better understand how the exception can be thrown in JSTL.

 

The code of the program is given below:

 

 

 

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>Throwing an Exception</title>
</head>

<body>5 divided by 0 is 
<c:out value="${5/0}" />
</body>
</html>

The output of the program is given below:

Download this example.

Advertisements

Advertisement

Posted on: March 12, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

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.

Discuss: Throwing an Exception in JSTL  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0