Shared Tutorials

Tutorials Shared by the Internet Community


  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Basic Detail

Exception handling in JSP

Learn how to handle exceptions in Java Server Pages(JSP)
  • Total Hits: 20397

  • Average Rating :
    Tutorial RatingTutorial RatingTutorial RatingTutorial RatingTutorial RatingTutorial Rating


  • Total Votes: 164 votes

  • Average Rating: 2.91 out of  5

  • Category: JAVA/Misc

  • Set as Favorite


Exception is nothing but a condition which can cause an abnormal termination of a program flow. Most of the times an exception occurs due to wrong data entered by user. In this tutorial we will see how to handle exceptions in Java Server Pages(JSP). There are two ways to handle exceptions in JSP.

1) Using try-catch block in scriptlet: It is similar to the exception handling in java. Since scriptlet in JSP allows us to use java code in JSP pages, we are free to handle exceptions using try catch blocks in scriptlet.
2) Using exception implicit object: Using scriptlet in JSP is disregarded a long time back so its better to handle exception in this way. We can handle any execption in JSP using exception implicit object.

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 35.98%  59
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.37%  17
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 11.59%  19
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 10.98%  18
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 31.1%  51

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.