Home Jsp Simple-jsp-example Throwing an Exception in JSTL



Throwing an Exception in JSTL
Posted on: March 12, 2008 at 12:00 AM
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.

Related Tags for Throwing an Exception in JSTL:
cexceptionidestldiviojstlvinumberthisidapprowjsshowifexampleprogramtoramexamsheilthrowcanpeceinstamtrcajafterthroughpenhowhrproppxaxamptrysatanyishallivmplgodivideexceptandarttssthshostapafhatpleplprndonogro


More Tutorials from this section

Ask Questions?    Discuss: Throwing an Exception in JSTL  

Post your Comment


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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.