{"id":10442,"date":"2015-08-28T07:28:41","date_gmt":"2015-08-28T11:28:41","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/?p=10442"},"modified":"2015-08-24T10:26:41","modified_gmt":"2015-08-24T14:26:41","slug":"exampletag-java-very-simple-custom-tag-remember-to-install-it-in-the-web-infclassescwptags-directory","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=10442","title":{"rendered":"ExampleTag.java Very simple custom tag. Remember to install it in the WEB-INF\/classes\/cwp\/tags directory."},"content":{"rendered":"<pre>ExampleTag.java Very simple custom tag. Remember to install it in the WEB-INF\/classes\/cwp\/tags directory. \r\n\r\n\r\npackage cwp.tags;\r\n\r\nimport javax.servlet.jsp.*;\r\nimport javax.servlet.jsp.tagext.*;\r\nimport java.io.*;\r\n\r\n\/** Very simple JSP tag that just inserts a string\r\n\u00a0*\u00a0 (\"Custom tag example...\") into the output.\r\n\u00a0*\u00a0 The actual name of the tag is not defined here;\r\n\u00a0*\u00a0 that is given by the Tag Library Descriptor (TLD)\r\n\u00a0*\u00a0 file that is referenced by the taglib directive\r\n\u00a0*\u00a0 in the JSP file.\r\n\u00a0*\u00a0 &lt;P&gt;\r\n\u00a0*\u00a0 Taken from Core Web Programming Java 2 Edition\r\n\u00a0*\u00a0 from Prentice Hall and Sun Microsystems Press,\r\n\u00a0*\u00a0 .\r\n\u00a0*\u00a0 May be freely used or adapted.\r\n\u00a0*\/\r\n\r\npublic class ExampleTag extends TagSupport {\r\n\u00a0 public int doStartTag() {\r\n\u00a0\u00a0\u00a0 try {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 JspWriter out = pageContext.getOut();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 out.print(\"Custom tag example \" +\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"(cwp.tags.ExampleTag)\");\r\n\u00a0\u00a0\u00a0 } catch(IOException ioe) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(\"Error in ExampleTag: \" + ioe);\r\n\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0 return(SKIP_BODY);\r\n\u00a0 }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ExampleTag.java Very simple custom tag. Remember to install it in the WEB-INF\/classes\/cwp\/tags directory. package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; \/** Very simple JSP tag that just inserts a string \u00a0*\u00a0 (&#8220;Custom tag example&#8230;&#8221;) into the output. \u00a0*\u00a0 The actual name of the tag is not defined here; \u00a0*\u00a0 that is given by the &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=10442\">Continue reading<\/a><\/p>\n","protected":false},"author":130,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1417,1424],"tags":[706,308,285],"class_list":["post-10442","post","type-post","status-publish","format-standard","hentry","category-code-programming-samples--","category-javaj2eej2me","tag-code","tag-java","tag-285","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":27090,"url":"http:\/\/bangla.sitestree.com\/?p=27090","url_meta":{"origin":10442,"position":0},"title":"ExampleTag.java Very simple custom tag. Remember to install it in the WEB-INF\/classes\/cwp\/tags directory. #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics","author":"Author-Check- Article-or-Video","date":"May 10, 2021","format":false,"excerpt":"ExampleTag.java Very simple custom tag. Remember to install it in the WEB-INF\/classes\/cwp\/tags directory. package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; \/** Very simple JSP tag that just inserts a string * (\"Custom tag example...\") into the output. * The actual name of the tag is not defined here; *\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":26820,"url":"http:\/\/bangla.sitestree.com\/?p=26820","url_meta":{"origin":10442,"position":1},"title":"StringBean.java  Bean used to demonstrate jsp:useBean, etc. Remember to install it in the WEB-INF\/classes\/cwp directory. #Programming Code Examples #Java\/J2EE\/J2ME #JSP","author":"Author-Check- Article-or-Video","date":"May 2, 2021","format":false,"excerpt":"StringBean.java Bean used to demonstrate jsp:useBean, etc. Remember to install it in the WEB-INF\/classes\/cwp directory. package cwp; \/** A simple bean that has a single String property * called message. * <P> * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems Press, *\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":10442,"position":2},"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":10148,"url":"http:\/\/bangla.sitestree.com\/?p=10148","url_meta":{"origin":10442,"position":3},"title":"StringBean.java Bean used to demonstrate jsp:useBean, etc. Remember to install it in the WEB-INF\/classes\/cwp directory.","author":"","date":"August 13, 2015","format":false,"excerpt":"StringBean.java\u00a0 Bean used to demonstrate jsp:useBean, etc. Remember to install it in the WEB-INF\/classes\/cwp directory. package cwp; \/** A simple bean that has a single String property \u00a0*\u00a0 called message. \u00a0*\u00a0 <P> \u00a0*\u00a0 Taken from Core Web Programming Java 2 Edition \u00a0*\u00a0 from Prentice Hall and Sun Microsystems Press, \u00a0*\u00a0\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":27094,"url":"http:\/\/bangla.sitestree.com\/?p=27094","url_meta":{"origin":10442,"position":4},"title":"SimpleExample.jsp Page that uses the ExampleTag custom tag. #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics","author":"Author-Check- Article-or-Video","date":"May 10, 2021","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;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":10464,"url":"http:\/\/bangla.sitestree.com\/?p=10464","url_meta":{"origin":10442,"position":5},"title":"DebugExample.jsp Page that uses the DebugTag custom tag","author":"","date":"August 28, 2015","format":false,"excerpt":"# DebugExample.jsp Page that uses the DebugTag custom tag <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Illustration of SimplePrimeTag tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. --> <HTML> <HEAD> <TITLE>Using the Debug Tag<\/TITLE>\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\/10442","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\/130"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10442"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10442\/revisions"}],"predecessor-version":[{"id":10443,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10442\/revisions\/10443"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10442"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}