{"id":69278,"date":"2021-08-16T20:38:52","date_gmt":"2021-08-17T00:38:52","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/jsp-tags-37\/"},"modified":"2021-08-16T20:38:52","modified_gmt":"2021-08-17T00:38:52","slug":"jsp-tags-37","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=69278","title":{"rendered":"JSP Tags #37"},"content":{"rendered":"<pre>\nJSP Tag Library (JSTL)\n\nJSP Disadvantage\n1. Java code embedded in scriptlets make the\n                                \n                                         code difficult to understand\n2. Reduced code reusability\n3. Difficult to modify [Java Code]\n4. Java code needs to use Class Casting\n\nJSTL Advantages\n\n1. Better code\n2. Enhanced Code reusability\n3. No type casting from the request and session objects\n4. Expression Language in JSP makes it easier to call getter and setter methods.\n\nDrawback\n\n1. Adds overhead as JSTL adds more into the resultant Servlet\n2. Can not do all that Java code can do\n\n\nFour Libraries:\n\nCore: Basic tags like loops, conditions, and input\/output\nfmt: Format like date format\nxml: XML processing\nsql: Database access\n\n\nCore Tag Library\n\n&lt;%@ taglib prefix=\"core\" uri=\"http:\/\/java.sun.com\/jsp\/jstl\/core\" %&gt; \n&lt;core:set var=\"var\" scope=\"session\" value=\"...\"\/&gt; \n\nConditional\n&lt;core:if test=\"${condition}\"&gt; &lt;\/core:if&gt; \n&lt;core:choose&gt;\n     &lt;core:when test=\"condition1\" &gt;\n     ...\n     &lt;\/core:when&gt;\n    &lt;core:when test=\"condition2\" &gt;\n    ...\n    &lt;\/core:when&gt;\n    &lt;core:otherwise&gt;\n    &lt;\/core:otherwise&gt;\n&lt;\/core:choose&gt;\n\n&lt;core:otherwise&gt; will be executed only and if only all other conditions fail.\n\n\nIterator\n\nIterator tages are used to traverse an array of objects and process each object (when required)\n&lt;c:forEach var=\"item\" items=\"collection\"&gt;\n&lt;\/c:forEach&gt;\n\nor\n\n&lt;c:forEach begin=\"0\" end=\"10\" varStatus=\"status\" step=\"1\" &gt;\n&lt;\/c:forEach&gt;\n\n\nFunction Tag Library\n\nBasic String Functions\n&lt;%@ taglib prefix=\"fn\" uri=\"http:\/\/java.sun.com\/jsp\/jstl\/functions\" %&gt; \n\nExample\n&lt;%@ taglib uri=\"\/WEB-INF\/fn.tld\" prefix=\"fn\" %&gt;\n&lt;%@ taglib prefix=\"core\" uri=\"http:\/\/java.sun.com\/jsp\/jstl\/core\" %&gt; \n\n&lt;core:set var=\"test\" value=\"Hello World\"\/&gt;\nIndex of l is :- ${fn:indexOf(test, \"l\")}&lt;br&gt;\n\n<\/pre>\n<p>From: http:\/\/sitestree.com\/?p=4792<br \/> Categories:37<br \/>Tags:<br \/> Post Data:2007-12-05 06:15:58<\/p>\n<pre><code>    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\"&gt;https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    (Big Data, Cloud, Security, Machine Learning): Courses: &lt;a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"&gt; http:\/\/Training.SitesTree.com&lt;\/a&gt; \n    In Bengali: &lt;a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\"&gt;http:\/\/Bangla.SaLearningSchool.com&lt;\/a&gt;\n    &lt;a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\"&gt;http:\/\/SitesTree.com&lt;\/a&gt;\n    8112223 Canada Inc.\/JustEtc: &lt;a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\"&gt;http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) &lt;\/a&gt;\n    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com'&gt; https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    Medium: &lt;a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"&gt; https:\/\/medium.com\/@SayedAhmedCanada &lt;\/a&gt;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>JSP Tag Library (JSTL) JSP Disadvantage 1. Java code embedded in scriptlets make the code difficult to understand 2. Reduced code reusability 3. Difficult to modify [Java Code] 4. Java code needs to use Class Casting JSTL Advantages 1. Better code 2. Enhanced Code reusability 3. No type casting from the request and session objects &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=69278\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-69278","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":66423,"url":"http:\/\/bangla.sitestree.com\/?p=66423","url_meta":{"origin":69278,"position":0},"title":"JSF: Lesson &#8211; 1: JSF Specifications #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 19, 2021","format":false,"excerpt":"Video Demonstration of a sample JSF application create: Read the article first JSF Specifications JSF is not standalone technology, you have to use it in conjunction with JSPs, Servlets, EJBs How to use JSF with Servlets and EJBs: In Servlet or EJB, explicitly create instances of UI components and use\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10446,"url":"http:\/\/bangla.sitestree.com\/?p=10446","url_meta":{"origin":69278,"position":1},"title":"SimpleExample.jsp Page that uses the ExampleTag custom tag.","author":"","date":"August 28, 2015","format":false,"excerpt":"SimpleExample.jsp Page that uses the ExampleTag custom tag. <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Illustration of very simple JSP custom tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. --> <HTML> <HEAD> <%@ taglib\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78391,"url":"http:\/\/bangla.sitestree.com\/?p=78391","url_meta":{"origin":69278,"position":2},"title":"Code Refactoring in Java EE","author":"Sayed","date":"August 23, 2025","format":false,"excerpt":"From AI Tools\/OpenAI\/Internet \" Absolutely! Here\u2019s a concise, copyright-free summary of Java EE code refactoring Java EE Code Refactoring: Best Practices Refactoring in Java EE helps improve code quality, maintainability, and performance without changing functionality. Here are some key practices: 1. General Refactoring Remove duplicate code with helper methods or\u2026","rel":"","context":"In &quot;Anything JAVA&quot;","block_context":{"text":"Anything JAVA","link":"http:\/\/bangla.sitestree.com\/?cat=1975"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26793,"url":"http:\/\/bangla.sitestree.com\/?p=26793","url_meta":{"origin":69278,"position":3},"title":"Expressions.jsp  Page that demonstrates JSP expressions. Uses the JSP-Styles  style sheet. #Programming Code Examples #Java\/J2EE\/J2ME #JSP","author":"Author-Check- Article-or-Video","date":"May 1, 2021","format":false,"excerpt":"Expressions.jsp Page that demonstrates JSP expressions. Uses the JSP-Styles style sheet. <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Example of JSP Expressions. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. --> <HTML> <HEAD> <TITLE>JSP Expressions<\/TITLE>\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10132,"url":"http:\/\/bangla.sitestree.com\/?p=10132","url_meta":{"origin":69278,"position":4},"title":"Expressions.jsp Page that demonstrates JSP expressions. Uses the JSP-Styles style sheet.","author":"","date":"July 29, 2015","format":false,"excerpt":"Expressions.jsp\u00a0 Page that demonstrates JSP expressions. Uses the JSP-Styles\u00a0 style sheet. <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Example of JSP Expressions. \u00a0 \u00a0 Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. --> <HTML> <HEAD>\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10135,"url":"http:\/\/bangla.sitestree.com\/?p=10135","url_meta":{"origin":69278,"position":5},"title":"Expressions.jsp Page that demonstrates JSP expressions. Uses the JSP-Styles style sheet.","author":"","date":"August 9, 2015","format":false,"excerpt":"Expressions.jsp\u00a0 Page that demonstrates JSP expressions. Uses the JSP-Styles\u00a0 style sheet. <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Example of JSP Expressions. \u00a0 \u00a0 Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. --> <HTML> <HEAD>\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/69278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69278"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/69278\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69278"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}