{"id":1707,"date":"2011-03-17T16:13:05","date_gmt":"2011-03-17T10:43:05","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=1707"},"modified":"2011-03-17T16:13:05","modified_gmt":"2011-03-17T10:43:05","slug":"setup-application-to-use-javaserver-pages-standard-tag-libraryjstl","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/java\/jsp\/setup-application-to-use-javaserver-pages-standard-tag-libraryjstl\/","title":{"rendered":"Setup application to use JavaServer Pages Standard Tag Library(JSTL)"},"content":{"rendered":"<p>To check whether JSTL is supported by your web container or not, run below code in jsp page:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\nSimple Test for JSTL Support: ${1+1}\n&lt;c:out value=&quot;${1+1}&quot; \/&gt;\n<\/pre>\n<p>With taglib url as :<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;%@taglib prefix=&quot;c&quot; uri=&quot;http:\/\/java.sun.com\/jsp\/jstl\/core&quot; %&gt;\n<\/pre>\n<p>Or<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;%@taglib prefix=&quot;c&quot; uri=&quot;http:\/\/java.sun.com\/jstl\/core&quot; %&gt;\n<\/pre>\n<p><!--more--><br \/>\nIf jstl is not supported by your application, then it will give error like:<\/p>\n<blockquote><p>org.apache.jasper.JasperException: The absolute uri: http:\/\/java.sun.com\/jsp\/jstl\/core cannot be resolved in either web.xml or the jar files deployed with this application<br \/>\norg.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)<br \/>\norg.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)<\/p><\/blockquote>\n<p>Or<\/p>\n<blockquote><p>org.apache.jasper.JasperException: \/test_c2_jstl_core_taglib_decl.jsp(11,32) According to TLD or attribute directive in tag file, attribute value does not accept any expressions<br \/>\norg.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)<br \/>\norg.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)<\/p><\/blockquote>\n<p>To give the jstl support to your applications, <a title=\"download JSTL jar files\" href=\"http:\/\/jstl.java.net\/download.html\" target=\"_blank\">download &#8220;JSTL API&#8221;\u009d and &#8220;JSTL Implementation&#8221;\u009d jar files from here <\/a>and paste it into the lib folder of your web application.<\/p>\n<p>Now run the jsp page again, and you will be able to check output.<br \/>\nJSTL includes a wide variety of tags that fit into discrete functional areas. To reflect this, as well as to give each area its own namespace, JSTL is exposed as multiple tag libraries. The URIs for the libraries are as follows:<\/p>\n<ol>\n<li><strong>Core:<\/strong> http:\/\/java.sun.com\/jsp\/jstl\/core<\/li>\n<li><strong>XML:<\/strong> http:\/\/java.sun.com\/jsp\/jstl\/xml<\/li>\n<li><strong>Internationalization:<\/strong> http:\/\/java.sun.com\/jsp\/jstl\/fmt<\/li>\n<li><strong>SQL:<\/strong> http:\/\/java.sun.com\/jsp\/jstl\/sql<\/li>\n<li><strong>Functions:<\/strong> http:\/\/java.sun.com\/jsp\/jstl\/functions<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Setup application to use JavaServer Pages Standard Tag Library(JSTL)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[330,137],"class_list":["post-1707","post","type-post","status-publish","format-standard","hentry","category-jsp","tag-jsp","tag-jstl"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1720,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/how-to-create-jsp-custom-tag-using-tag-interface-or-tagsupport\/","url_meta":{"origin":1707,"position":0},"title":"How to Create JSP Custom Tag \u2013 using Tag interface or TagSupport","author":"Jitendra","date":"March 17, 2011","format":false,"excerpt":"Tutorial of creating JSP Custom Tag \u2013 using Tag interface or TagSupport in JAVA","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"How to Create Custom Tag in JSP","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/03\/How-to-Create-Custom-Tag-in-JSP.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1724,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/how-to-create-jsp-custom-tag-using-bodytag-interface-or-bodytagsupport\/","url_meta":{"origin":1707,"position":1},"title":"How to Create JSP Custom Tag \u2013 using BodyTag interface or BodyTagSupport","author":"Jitendra","date":"March 17, 2011","format":false,"excerpt":"Tutorial on How to Create JSP Custom Tag \u2013 using BodyTag interface or BodyTagSupport","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"How to Create Custom Tag in JSP","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/03\/How-to-Create-Custom-Tag-in-JSP.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2034,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/jsp\/tutorial-of-simple-jsp-tiles-application-without-struts\/","url_meta":{"origin":1707,"position":2},"title":"Tutorial of Simple JSP Tiles application without Struts","author":"Jitendra","date":"April 15, 2011","format":false,"excerpt":"Example of Simple JSP Tiles application without Struts","rel":"","context":"In &quot;JSP&quot;","block_context":{"text":"JSP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/jsp\/"},"img":{"alt_text":"Simple JSP Tiles without Struts","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/04\/Simple-JSP-Tiles-without-Struts.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1460,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/jsp\/setting-session-timeout-in-jsp-servlet\/","url_meta":{"origin":1707,"position":3},"title":"Setting Session Timeout in JSP Servlet","author":"Jitendra","date":"February 7, 2011","format":false,"excerpt":"How to set the Session Time out in JSP and Servlet","rel":"","context":"In &quot;JSP&quot;","block_context":{"text":"JSP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/jsp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1712,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/jsp\/life-cycle-of-jsp-tag-interface\/","url_meta":{"origin":1707,"position":4},"title":"Life cycle of JSP Tag interface","author":"Jitendra","date":"March 17, 2011","format":false,"excerpt":"Life cycle of JSP Tag interface in Java","rel":"","context":"In &quot;JSP&quot;","block_context":{"text":"JSP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/jsp\/"},"img":{"alt_text":"Life Cycle of Tag Interface","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/03\/Life-Cycle-of-Tag-Interface.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1976,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/jsp\/j2ee-servlet-jsp-jsf-and-jms-version-table\/","url_meta":{"origin":1707,"position":5},"title":"J2EE &#8211; Servlet , JSP , JSF and JMS Version Table","author":"Jitendra","date":"April 13, 2011","format":false,"excerpt":"J2EE - Servlet , JSP , JSF and JMS Version Table","rel":"","context":"In &quot;JSP&quot;","block_context":{"text":"JSP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/jsp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=1707"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1707\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=1707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=1707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=1707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}