{"id":10137,"date":"2015-08-10T07:22:33","date_gmt":"2015-08-10T11:22:33","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/?p=10137"},"modified":"2015-08-01T09:24:17","modified_gmt":"2015-08-01T13:24:17","slug":"bgcolor-jsp-page-that-demonstrates-jsp-scriptlets-uses-the-jsp-styles-style-sheet","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=10137","title":{"rendered":"BGColor.jsp Page that demonstrates JSP scriptlets. Uses the JSP-Styles style sheet."},"content":{"rendered":"<pre>BGColor.jsp\u00a0 Page that demonstrates JSP scriptlets. Uses the JSP-Styles\u00a0 style sheet.\r\n\r\n&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"&gt;\r\n&lt;!--\u00a0\u00a0 \u00a0\r\nTaken from Core Web Programming Java 2 Edition\r\nfrom Prentice Hall and Sun Microsystems Press,\r\n.\r\nMay be freely used or adapted.\r\n--&gt;\r\n&lt;HTML&gt;\r\n&lt;HEAD&gt;\r\n\u00a0 &lt;TITLE&gt;Color Testing&lt;\/TITLE&gt;\r\n&lt;\/HEAD&gt;\r\n&lt;% \r\nString bgColor = request.getParameter(\"bgColor\");\r\nboolean hasExplicitColor = true;\r\nif (bgColor == null) {\r\n\u00a0 hasExplicitColor = false;\r\n\u00a0 bgColor = \"WHITE\";\r\n} \r\n%&gt;\r\n&lt;BODY BGCOLOR=\"&lt;%= bgColor %&gt;\"&gt;\r\n&lt;H2 ALIGN=\"CENTER\"&gt;Color Testing&lt;\/H2&gt;\r\n&lt;%\r\nif (hasExplicitColor) {\r\n\u00a0 out.println(\"You supplied an explicit background color of \" +\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 bgColor + \".\");\r\n} else {\r\n\u00a0 out.println(\"Using default background color of WHITE. \" +\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"Supply the bgColor request attribute to try \" +\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"a standard color or RRGGBB value, or to see \" +\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"if your browser supports X11 color names.\");\r\n}\r\n%&gt;\r\n&lt;\/BODY&gt;\r\n&lt;\/HTML&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>BGColor.jsp\u00a0 Page that demonstrates JSP scriptlets. Uses the JSP-Styles\u00a0 style sheet. &lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&#8221;&gt; &lt;!&#8211;\u00a0\u00a0 \u00a0 Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. &#8211;&gt; &lt;HTML&gt; &lt;HEAD&gt; \u00a0 &lt;TITLE&gt;Color Testing&lt;\/TITLE&gt; &lt;\/HEAD&gt; &lt;% String bgColor = request.getParameter(&#8220;bgColor&#8221;); boolean &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=10137\">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,364,1455,1456,1454],"class_list":["post-10137","post","type-post","status-publish","format-standard","hentry","category-code-programming-samples--","category-javaj2eej2me","tag-code","tag-jsp","tag-script","tag-styles-style","tag-1454","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":26810,"url":"http:\/\/bangla.sitestree.com\/?p=26810","url_meta":{"origin":10137,"position":0},"title":"BGColor.jsp  Page that demonstrates JSP scriptlets. Uses the JSP-Styles  style sheet. #Programming Code Examples #Java\/J2EE\/J2ME #JSP","author":"Author-Check- Article-or-Video","date":"May 2, 2021","format":false,"excerpt":"BGColor.jsp Page that demonstrates JSP scriptlets. Uses the JSP-Styles style sheet. <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. --> <HTML> <HEAD> <TITLE>Color Testing<\/TITLE> <\/HEAD> <% String bgColor\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":10460,"url":"http:\/\/bangla.sitestree.com\/?p=10460","url_meta":{"origin":10137,"position":1},"title":"HeadingExample.jsp Page that uses the HeadingTag custom tag","author":"","date":"August 28, 2015","format":false,"excerpt":"HeadingExample.jsp Page that uses the HeadingTag custom tag <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Illustration of HeadingTag 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>Some Tag-Generated Headings<\/TITLE> <\/HEAD> <BODY>\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":27117,"url":"http:\/\/bangla.sitestree.com\/?p=27117","url_meta":{"origin":10137,"position":2},"title":"HeadingExample.jsp Page that uses the HeadingTag custom tag #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics","author":"Author-Check- Article-or-Video","date":"May 11, 2021","format":false,"excerpt":"HeadingExample.jsp Page that uses the HeadingTag custom tag <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Illustration of HeadingTag 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>Some Tag-Generated Headings<\/TITLE> <\/HEAD> <BODY>\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":10146,"url":"http:\/\/bangla.sitestree.com\/?p=10146","url_meta":{"origin":10137,"position":3},"title":"PluginApplet.jsp Page that demonstrates the use of jsp:plugin.","author":"","date":"August 12, 2015","format":false,"excerpt":"PluginApplet.jsp\u00a0 Page that demonstrates the use of jsp:plugin. Requires you to compile and install PluginApplet.java, TextPanel.java, DrawingPanel.java, and WindowUtilities.java\u00a0 Since these are classes sent to the client to used by applets, the .class files should be in the same directory as the JSP page, not in the WEB-INF\/classes directory where\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":26818,"url":"http:\/\/bangla.sitestree.com\/?p=26818","url_meta":{"origin":10137,"position":4},"title":"PluginApplet.jsp  Page that demonstrates the use of jsp:plugin. #Programming Code Examples #Java\/J2EE\/J2ME #JSP","author":"Author-Check- Article-or-Video","date":"May 2, 2021","format":false,"excerpt":"PluginApplet.jsp Page that demonstrates the use of jsp:plugin. Requires you to compile and install PluginApplet.java, TextPanel.java, DrawingPanel.java, and WindowUtilities.java Since these are classes sent to the client to used by applets, the .class files should be in the same directory as the JSP page, not in the WEB-INF\/classes directory where\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":10457,"url":"http:\/\/bangla.sitestree.com\/?p=10457","url_meta":{"origin":10137,"position":5},"title":"HeadingTag.java Custom tag that makes use of a tag body","author":"","date":"August 28, 2015","format":false,"excerpt":"HeadingTag.java Custom tag that makes use of a tag body package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; \/** Generates an HTML heading with the specified background \u00a0*\u00a0 color, foreground color, alignment, font, and font size. \u00a0*\u00a0 You can also turn on a border around it, which normally \u00a0*\u00a0 just\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\/10137","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=10137"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10137\/revisions"}],"predecessor-version":[{"id":10139,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10137\/revisions\/10139"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10137"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}