

{"id":80145,"date":"2020-08-08T21:26:56","date_gmt":"2020-08-08T15:56:56","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=80145"},"modified":"2021-08-25T13:48:13","modified_gmt":"2021-08-25T08:18:13","slug":"jsp-exception-handling","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/","title":{"rendered":"Exception Handling in JSP with Examples"},"content":{"rendered":"<p>As we all know that human beings are bound to make mistakes. Same applies to the coding. While coding we might make mistakes thus exception handling is very important. In this article, we will learn about the errors in JSP and Exception handling in JSP with examples.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80481\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg\" alt=\"Exception Handling in JSP\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<h2>Exception Handling in JSP<\/h2>\n<p>Exceptions in JSP can be of three types:<\/p>\n<h3>1. Checked Exceptions<\/h3>\n<p>Checked exceptions are those exceptions that users make. It also includes exceptions that a programmer and developer can\u2019t see. For example, a file that needs to be compiled can\u2019t be found. The compiler y can&#8217;t ignore these exceptions at the time of compilation. Other examples can be an IO Exception or an SQL Exception.<\/p>\n<h3>2. Runtime Exceptions<\/h3>\n<p>Unlike checked exceptions, the compiler may avoid these exceptions at the compilation time. This exception might have been avoided by the developer or programmer. Arithmetic exception, Null Pointer exception, ArrayIndexOutOfBounds exception fall under this category.<\/p>\n<h3>3. Errors<\/h3>\n<p>Errors are also ignored at the time of compilation but they are out of the reach of the user or programmer. One cannot do anything about it. These include Instantiation error, Internal error, Stack Overflow etc.<\/p>\n<h2>JSP Exception Object<\/h2>\n<p>It is an instance of Throwable class and is available just for error pages. Some methods are as follows:<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>S.No.<\/b><\/td>\n<td><b>Method<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td>public String getMessage()<\/td>\n<td><span style=\"font-weight: 400\">This message will be initialized in a throwable constructor. This method will provide a description of the exception.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2<\/span><\/td>\n<td>public Throwable getCause()<\/td>\n<td><span style=\"font-weight: 400\">Gives the cause of the exception.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">3<\/span><\/td>\n<td>public String toString()<\/td>\n<td><span style=\"font-weight: 400\">This method will return the class associated with getMessage().<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">4<\/span><\/td>\n<td>public void printStackTrace()<\/td>\n<td><span style=\"font-weight: 400\">Gives the stack trace for the system error with the toString() message.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">5<\/span><\/td>\n<td>public StackTraceElement [] getStackTrace()<\/td>\n<td><span style=\"font-weight: 400\">This method will return the array of all the elements of stack trace.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">6<\/span><\/td>\n<td>public Throwable fillInStackTrace()<\/td>\n<td><span style=\"font-weight: 400\">This method will fill the throwable object with recent stack trace with any previous information.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Catch JSP Exceptions<\/h2>\n<p>There are three ways to catch an exception in JSP pages:<\/p>\n<h3>1. Using error page and isErrorPage<\/h3>\n<p><strong>Syntax:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;%@ page errorPage=\"exception.jsp\" %&gt;\r\n&lt;%@ page isErrorPage=\"true\" %&gt;\r\n<\/pre>\n<p>JSP pages provide the functionality of error page and iserror page implicit objects to deal with errors. This is called page-level exception handling.<\/p>\n<p><strong>For Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"> main.jsp\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Enter two Integers to divide&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;form action=\"divide.jsp\"&gt;\r\nEnter First Integer:&lt;input type=\"text\" name=\"number1\" \/&gt;&lt;br\/&gt;\r\nEnter Second Integer:&lt;input type=\"text\" name=\"mumber2\" \/&gt;\r\n&lt;input type=\"submit\" value=\"Result\"\/&gt;\r\n&lt;\/form&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n \r\ndivide.jsp\r\n&lt;%@ page errorPage=\"exception.jsp\" %&gt;\r\n&lt;html&gt;\r\n&lt;body&gt;\r\n&lt;%\r\nString num1=request.getParameter(\"number1\");\r\nString num2=request.getParameter(\"number2\");\r\nint n1= Integer.parseInt(num1);\r\nint n2= Integer.parseInt(num2);\r\nint result= n1\/n2;\r\nout.print(\"Output is: \"+ result);\r\n%&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n \r\nexception.jsp\r\n&lt;%@ page isErrorPage=\"true\" %&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Exception&lt;\/title&gt;&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;a href: Hey,Got this Exception: &lt;\/a&gt;&lt;%= exception %&gt; &lt;br\/&gt;\r\n&lt;a&gt;Check the data entered.&lt;\/a&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Explanation:<\/strong><br \/>\nThe main page takes two input values to divide. To perform the operation, it calls divide.jsp which specifies that an error occurs then calls exception.jsp. If the user inputs denominator as zero then an exception will occur and exception.jsp runs which specifies that it is an error page. Following are the results:<\/p>\n<p><strong>Output:<\/strong><\/p>\n<h3><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80482\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E1.png\" alt=\"Error Page and iserror page in jsp\" width=\"1366\" height=\"150\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E1.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E1-300x33.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E1-1024x112.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E1-150x16.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E1-768x84.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E1-520x57.png 520w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/h3>\n<h3><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80483\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E2.png\" alt=\"Exception handling in jsp\" width=\"1366\" height=\"142\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E2.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E2-300x31.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E2-1024x106.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E2-150x16.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E2-768x80.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E2-520x54.png 520w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/h3>\n<h3>2. Try and Catch Block<\/h3>\n<p>This method is known for catching exceptions directly using a try and catch block like core java.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;%@ page language=\"java\" %&gt;\r\n&lt;html&gt;\r\n&lt;body&gt;\r\n&lt;%\r\ntry {\r\nint y = Integer.parseInt(request.getParameter(\"y\")) ;\r\n%&gt;\r\n&lt;h3&gt;The number is y=: &lt;%=y%&gt;&lt;\/h3&gt;\r\n&lt;%\r\n} catch (NumberFormatException x) {\r\n%&gt;\r\n&lt;h3&gt;Number Format Exception &lt;br\/&gt; Error: y must be a number&lt;\/h3&gt;\r\n&lt;%\r\n}\r\n%&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Explanation:<\/strong><br \/>\nIn this example no. will input through URL query string. If it is a number, it will show the number otherwise it will catch the exception as follows.<\/p>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80484\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E3.png\" alt=\"try and catch block in jsp\" width=\"1366\" height=\"150\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E3.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E3-300x33.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E3-1024x112.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E3-150x16.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E3-768x84.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E3-520x57.png 520w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n<h3>3. Using web.xml configuration<\/h3>\n<p>This method is also known as application-level exception handling. This is done by setting a predefined configuration for certain errors.<\/p>\n<p><strong>For Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;error-page&gt;\r\n    &lt;error-code&gt;showerror&lt;\/error-code&gt;\r\n    &lt;location&gt;showerror.jsp&lt;\/location&gt;\r\n&lt;\/error-page&gt;\r\n \r\nshowerror.jsp\r\n&lt;%@ page language=\"java\" contentType=\"text\/html; charset=UTF-8\"\r\n    pageEncoding=\"UTF-8\"%&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Error&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h2&gt; This page could not be found, sorry!!&lt;\/h2&gt;\r\n ${pageContext.errorData.requestURI}\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>Explanation:<\/strong> When we execute this code the errorData object will give the information about the error in requestURI of throwable object as follows:<\/p>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80485\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E4.png\" alt=\"handle exception in jsp\" width=\"1366\" height=\"130\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E4.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E4-300x29.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E4-1024x97.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E4-150x14.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E4-768x73.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/E4-520x49.png 520w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>This article discussed the exception handling in detail. It poured light upon the types of exceptions, methods of Exception. It described three ways to handle exceptions namely: direct handling, page-level exception handling and application level exception handling.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we all know that human beings are bound to make mistakes. Same applies to the coding. While coding we might make mistakes thus exception handling is very important. In this article, we will&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":80481,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22403],"tags":[22893,22890,22892,22891],"class_list":["post-80145","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jsp","tag-errors-in-jsp","tag-exception-handling-in-jsp","tag-handle-exception-in-jsp","tag-jsp-exception-handling"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Exception Handling in JSP with Examples - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn Exception Handling in JSP. Types of JSP exceptions - Checked, Runtime &amp; Errors. Ways to handle exceptions - Try catch block, error page &amp; isErrorPage\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exception Handling in JSP with Examples - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn Exception Handling in JSP. Types of JSP exceptions - Checked, Runtime &amp; Errors. Ways to handle exceptions - Try catch block, error page &amp; isErrorPage\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-08T15:56:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T08:18:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Exception Handling in JSP with Examples - DataFlair","description":"Learn Exception Handling in JSP. Types of JSP exceptions - Checked, Runtime & Errors. Ways to handle exceptions - Try catch block, error page & isErrorPage","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/","og_locale":"en_US","og_type":"article","og_title":"Exception Handling in JSP with Examples - DataFlair","og_description":"Learn Exception Handling in JSP. Types of JSP exceptions - Checked, Runtime & Errors. Ways to handle exceptions - Try catch block, error page & isErrorPage","og_url":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-08-08T15:56:56+00:00","article_modified_time":"2021-08-25T08:18:13+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"Exception Handling in JSP with Examples","datePublished":"2020-08-08T15:56:56+00:00","dateModified":"2021-08-25T08:18:13+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/"},"wordCount":557,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg","keywords":["errors in jsp","exception handling in jsp","handle exception in jsp","jsp exception handling"],"articleSection":["JSP Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/","url":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/","name":"Exception Handling in JSP with Examples - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg","datePublished":"2020-08-08T15:56:56+00:00","dateModified":"2021-08-25T08:18:13+00:00","description":"Learn Exception Handling in JSP. Types of JSP exceptions - Checked, Runtime & Errors. Ways to handle exceptions - Try catch block, error page & isErrorPage","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/JSP-Exceptions-Handling.jpg","width":1200,"height":628,"caption":"Exception Handling in JSP"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/jsp-exception-handling\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"JSP Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/jsp\/"},{"@type":"ListItem","position":3,"name":"Exception Handling in JSP with Examples"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.","url":"https:\/\/data-flair.training\/blogs\/author\/dfadteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/80145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=80145"}],"version-history":[{"count":2,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/80145\/revisions"}],"predecessor-version":[{"id":80486,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/80145\/revisions\/80486"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/80481"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=80145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=80145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=80145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}