{"id":10100,"date":"2015-08-01T08:30:07","date_gmt":"2015-08-01T12:30:07","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/?p=10100"},"modified":"2015-08-04T10:21:28","modified_gmt":"2015-08-04T14:21:28","slug":"contactsection-jsp-a-snippet-of-a-jsp-page-it-defines-a-field-accesscount-so-pages-that-include-it-and-want-to-directly-utilize-that-field-must-use-the-include-directive-not-jspinclude","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=10100","title":{"rendered":"ContactSection.jsp A snippet of a JSP page. It defines a field (accessCount), so pages that include it and want to directly utilize that field must use the include directive, not jsp:include."},"content":{"rendered":"<pre style=\"text-align: justify;\"><span id=\"result_box\" class=\"\" lang=\"bn\"><span class=\"hps\">ContactSection.jsp \u09b9\u099a\u09cd\u099b\u09c7 JSP<\/span> <span class=\"hps\">\u09aa\u09c3\u09b7\u09cd\u09a0\u09be\u09b0<\/span> <span class=\"hps\">\u098f\u0995\u099f\u09bf \u0985\u0982\u09b6\u0964<\/span><span class=\"hps\">\u098f\u099f\u09bf \u098f\u0995\u099f\u09bf \u09ab\u09bf\u09b2\u09cd\u09a1\u0995\u09c7 \u09b8\u0999\u09cd\u0997\u09be\u09df\u09bf\u09a4 \u0995\u09b0\u09c7 (accessCount), \u09b8\u09c1\u09a4\u09b0\u09be\u0982 \u09af\u09c7 \u09aa\u09c3\u09b7\u09cd\u09a0\u09be\u09df \u098f\u099f\u09bf \u0985\u09a8\u09cd\u09a4\u09b0\u09cd\u09ad\u09c1\u0995\u09cd\u09a4 \u09a5\u09be\u0995\u09c7 \u098f\u09ac\u0982<\/span> <span class=\"hps\">\u09b8\u09b0\u09be\u09b8\u09b0\u09bf<\/span> \u0989\u0995\u09cd\u09a4 \u09ab\u09bf\u09b2\u09cd\u09a1\u00a0<span class=\"hps\">\u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 \u0995\u09b0\u09be\u09a4\u09c7 \u099a\u09be\u09df \u09a4\u09be\u0995\u09c7 \u0986\u09ac\u09b6\u09cd\u09af\u0987\u00a0include directive \u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 \u0995\u09b0\u09a4\u09c7 \u09b9\u09ac\u09c7,\u00a0jsp:include \u09a8\u09df\u0964<\/span><span class=\"\">.<\/span><\/span>\r\n\r\n&lt;%@ page import=\"java.util.Date\" %&gt;\r\n\r\n&lt;%-- The following become fields in each servlet that\r\n\u00a0\u00a0\u00a0\u00a0 results from a JSP page that includes this file. --%&gt;\r\n&lt;%! \r\nprivate int accessCount = 0;\r\nprivate Date accessDate = new Date();\r\nprivate String accessHost = \"&lt;I&gt;No previous access&lt;\/I&gt;\";\r\n%&gt;\r\n\r\n&lt;P&gt;\r\n&lt;HR&gt;\r\nThis page \u00a9 2000 \r\n&lt;A HREF=\"http\/\/www.my-company.com\/\"&gt;my-company.com&lt;\/A&gt;.\r\nThis page has been accessed &lt;%= ++accessCount %&gt;\r\ntimes since server reboot. It was last accessed from \r\n&lt;%= accessHost %&gt; at &lt;%= accessDate %&gt;.\r\n\r\n&lt;% accessHost = request.getRemoteHost(); %&gt;\r\n&lt;% accessDate = new Date(); %&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ContactSection.jsp \u09b9\u099a\u09cd\u099b\u09c7 JSP \u09aa\u09c3\u09b7\u09cd\u09a0\u09be\u09b0 \u098f\u0995\u099f\u09bf \u0985\u0982\u09b6\u0964\u098f\u099f\u09bf \u098f\u0995\u099f\u09bf \u09ab\u09bf\u09b2\u09cd\u09a1\u0995\u09c7 \u09b8\u0999\u09cd\u0997\u09be\u09df\u09bf\u09a4 \u0995\u09b0\u09c7 (accessCount), \u09b8\u09c1\u09a4\u09b0\u09be\u0982 \u09af\u09c7 \u09aa\u09c3\u09b7\u09cd\u09a0\u09be\u09df \u098f\u099f\u09bf \u0985\u09a8\u09cd\u09a4\u09b0\u09cd\u09ad\u09c1\u0995\u09cd\u09a4 \u09a5\u09be\u0995\u09c7 \u098f\u09ac\u0982 \u09b8\u09b0\u09be\u09b8\u09b0\u09bf \u0989\u0995\u09cd\u09a4 \u09ab\u09bf\u09b2\u09cd\u09a1\u00a0\u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 \u0995\u09b0\u09be\u09a4\u09c7 \u099a\u09be\u09df \u09a4\u09be\u0995\u09c7 \u0986\u09ac\u09b6\u09cd\u09af\u0987\u00a0include directive \u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 \u0995\u09b0\u09a4\u09c7 \u09b9\u09ac\u09c7,\u00a0jsp:include \u09a8\u09df\u0964. &lt;%@ page import=&#8221;java.util.Date&#8221; %&gt; &lt;%&#8211; The following become fields in each servlet that \u00a0\u00a0\u00a0\u00a0 results from a JSP page that includes this file. &#8211;%&gt; &lt;%! &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=10100\">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":[364,531],"class_list":["post-10100","post","type-post","status-publish","format-standard","hentry","category-code-programming-samples--","category-javaj2eej2me","tag-jsp","tag-531","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":27251,"url":"http:\/\/bangla.sitestree.com\/?p=27251","url_meta":{"origin":10100,"position":0},"title":"ContactSection.jsp  A snippet of a JSP page. It defines a field (accessCount), so pages that include it and want to directly utilize that field must use the include directive, not jsp:include. #Programming Code Examples #Java\/J2EE\/J2ME","author":"Author-Check- Article-or-Video","date":"May 15, 2021","format":false,"excerpt":"ContactSection.jsp A snippet of a JSP page. It defines a field (accessCount), so pages that include it and want to directly utilize that field must use the include directive, not jsp:include. <%@ page import=\"java.util.Date\" %> <%-- The following become fields in each servlet that results from a JSP page that\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":10140,"url":"http:\/\/bangla.sitestree.com\/?p=10140","url_meta":{"origin":10100,"position":1},"title":"AccessCounts.jsp Page that demonstrates JSP declarations.","author":"","date":"August 7, 2015","format":false,"excerpt":"AccessCounts.jsp\u00a0 Page that demonstrates JSP declarations. <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!--\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> <TITLE>JSP Declarations<\/TITLE> <META NAME=\"keywords\" \u00a0\u00a0\u00a0\u00a0\u00a0 CONTENT=\"JSP,declarations,JavaServer,Pages,servlets\"> <META NAME=\"description\" \u00a0\u00a0\u00a0\u00a0\u00a0 CONTENT=\"A\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":26812,"url":"http:\/\/bangla.sitestree.com\/?p=26812","url_meta":{"origin":10100,"position":2},"title":"AccessCounts.jsp  Page that demonstrates JSP declarations. #Programming Code Examples #Java\/J2EE\/J2ME #JSP","author":"Author-Check- Article-or-Video","date":"May 2, 2021","format":false,"excerpt":"AccessCounts.jsp Page that demonstrates JSP declarations. <!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>JSP Declarations<\/TITLE> <META NAME=\"keywords\" CONTENT=\"JSP,declarations,JavaServer,Pages,servlets\"> <META NAME=\"description\" CONTENT=\"A quick example of\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":10440,"url":"http:\/\/bangla.sitestree.com\/?p=10440","url_meta":{"origin":10100,"position":3},"title":"SharedCounts1.jsp, SharedCounts2.jsp, and SharedCounts3.jsp Three pages that all use the AccessCountBean. Results you get depend on which page is hit first and how many total hits the combined pages receive.","author":"","date":"August 28, 2015","format":false,"excerpt":"<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Example of sharing beans. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. --> <HTML> <HEAD> <TITLE>Shared Access Counts: Page 1<\/TITLE> <LINK REL=STYLESHEET \u00a0\u00a0\u00a0\u00a0\u00a0 HREF=\"JSP-Styles.css\" \u00a0\u00a0\u00a0\u00a0\u00a0 TYPE=\"text\/css\"> <\/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":27088,"url":"http:\/\/bangla.sitestree.com\/?p=27088","url_meta":{"origin":10100,"position":4},"title":"SharedCounts1.jsp, SharedCounts2.jsp, and SharedCounts3.jsp Three pages that all use the AccessCountBean. Results you get depend on which page is hit first and how many total hits the combined pages receive. #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics","author":"Author-Check- Article-or-Video","date":"May 10, 2021","format":false,"excerpt":"SharedCounts1.jsp, SharedCounts2.jsp, and SharedCounts3.jsp Three pages that all use the AccessCountBean. Results you get depend on which page is hit first and how many total hits the combined pages receive. <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Example of sharing beans. Taken from Core Web Programming Java 2 Edition\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":10427,"url":"http:\/\/bangla.sitestree.com\/?p=10427","url_meta":{"origin":10100,"position":5},"title":"StringBean.jsp Page that manipulates the StringBean bean with both jsp:useBean (i.e., XML-style) syntax","author":"","date":"August 28, 2015","format":false,"excerpt":"StringBean.jsp Page that manipulates the StringBean bean with both jsp:useBean (i.e., XML-style) syntax package cwp; \/** Simple bean to illustrate sharing beans through \u00a0*\u00a0 use of the scope attribute of jsp:useBean. \u00a0*\u00a0 <P> \u00a0*\u00a0 Taken from Core Web Programming Java 2 Edition \u00a0*\u00a0 from Prentice Hall and Sun Microsystems Press,\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\/10100","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=10100"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10100\/revisions"}],"predecessor-version":[{"id":10626,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10100\/revisions\/10626"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10100"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}