{"id":66330,"date":"2021-07-18T11:25:00","date_gmt":"2021-07-18T15:25:00","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/servlet-random-information-java-short-notes\/"},"modified":"2021-07-18T11:25:00","modified_gmt":"2021-07-18T15:25:00","slug":"servlet-random-information-java-short-notes","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=66330","title":{"rendered":"Servlet Random Information #Java Short Notes"},"content":{"rendered":"<ul>\n<li> Web component information sharing: web context (ServletContext), request, session, and page     <\/li>\n<li> ServletContext &#8211; Scope: entire web-application (Servlets &amp; JSPs)     <\/li>\n<li> page\/PageContext : A single point of access for many of the attributes of a JSP page      <\/li>\n<li> For each access of the servlet a thread is created. In applications a thread can be accessed concurrently by many threads.     <\/li>\n<li> If the servlet accesses and edits some external resources, then data inconsistency, and  data loss may occur     <\/li>\n<li> Synchronized access should help:     <\/li>\n<li> public class TestServlet extends HttpServlet implements SingleThreadModel   will provide synchronization and concurrency      <\/li>\n<li> In JSP, you can include  &#8211; to provide thread safety      <\/li>\n<li> For SingleThreadModel: you still have to synchronize access to class variables and to any shared resources that are stored outside the servlet. example:\n<pre> synchronized(sharedResource) { }<\/pre>\n<\/li>\n<li> For high-traffic servlets, you should use explicit synchronization blocks rather than implementing SingleThreadModel<\/li>\n<li> Synchronization is only an issue if the servlet accesses external data resources &#8212; returns data from another source: not for a servlet that just performs a task with no data access  <\/li>\n<\/ul>\n<p> From: http:\/\/sitestree.com\/?p=4966<br \/> Categories:Java Short Notes<br \/>Tags:<br \/> Post Data:2007-03-19 19:26:45<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Web component information sharing: web context (ServletContext), request, session, and page ServletContext &#8211; Scope: entire web-application (Servlets &amp; JSPs) page\/PageContext : A single point of access for many of the attributes of a JSP page For each access of the servlet a thread is created. In applications a thread can be accessed concurrently by many &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=66330\">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-66330","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":78335,"url":"http:\/\/bangla.sitestree.com\/?p=78335","url_meta":{"origin":66330,"position":0},"title":"Java: ServletConfig vs ServletContext","author":"Sayed","date":"July 27, 2025","format":false,"excerpt":"Here\u2019s a clear and copyright-free comparison of ServletConfig vs ServletContext \u2014 perfect for learning or blogging. \ud83d\udd04 ServletConfig vs ServletContext in Java Both ServletConfig and ServletContext are part of the Java Servlet API and provide access to configuration data, but they serve different scopes and purposes. \ud83d\udccb Comparison Table FeatureServletConfigServletContextScopePer\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":74548,"url":"http:\/\/bangla.sitestree.com\/?p=74548","url_meta":{"origin":66330,"position":1},"title":"Web Component and Web Application Development #servlet #java #JSP","author":"Sayed","date":"May 10, 2022","format":false,"excerpt":"Trial Videos: Introduce Servlet Concepts Trial: Intro to Topics in Servlet-based Web Application Development. \u09b8\u09be\u09b0\u09ad\u09cd\u09b2\u09c7\u099f \u098f\u09b0 \u099f\u09aa\u09bf\u0995 \u0997\u09c1\u09b2\u09cb - \u099c\u09beURL Trial: Servlet InterfaceURL Trial: Generic ServletURL Trial: HttpServlet: Java Based Web Application DevelopmentURL Trial Video: Life Cycle of Servlet (In Bengali)URL Trial Video: How to Create Servlets (In Bengali)URL Trial:\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":74781,"url":"http:\/\/bangla.sitestree.com\/?p=74781","url_meta":{"origin":66330,"position":2},"title":"Playlist: Anything Java","author":"Sayed","date":"May 31, 2022","format":false,"excerpt":"Playlist: Anything Java: https:\/\/www.youtube.com\/playlist... #SaLearningSchoolShopForSoulSitesTree, #SaLearningSchool, #ShopForSoul, #SitesTree Starting Java training basic file operations in java basic java language concepts bengali javascript debugging data conversion in jsf applications debugging javascript code Docker and Vagrant Optional Java and\/or PHP Platform ejb application with bea weblogic eclipse experiment eclipse ant how to\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":74780,"url":"http:\/\/bangla.sitestree.com\/?p=74780","url_meta":{"origin":66330,"position":3},"title":"Java: Web Component and Web Application Development","author":"Sayed","date":"May 31, 2022","format":false,"excerpt":"(In the Bengali Language) Learn the Concepts (no code demo yet) Java (Java EE, J2EE) Web Component and Web Application Development. https:\/\/lnkd.in\/eRqd4bjX SaLearningSchool-ShopForSoul-SitesTree: For Paid Training: https:\/\/lnkd.in\/dNrqGDuP 5:57 Trial: HttpServlet: Java Based Web Application Development https:\/\/lnkd.in\/eTReji7H 9:33 Trial: Generic Servlet https:\/\/lnkd.in\/dd7z7fJZ 10:34 Trial: Servlet Interface https:\/\/lnkd.in\/eDh8XuSy 9:50 Trial Video: Life\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":66304,"url":"http:\/\/bangla.sitestree.com\/?p=66304","url_meta":{"origin":66330,"position":4},"title":"Servlet, JSP Specifications #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 18, 2021","format":false,"excerpt":"JSP Specification Servlet Specification Java Enterprise javabeans Specifications From: http:\/\/sitestree.com\/?p=4930 Categories:Java Short NotesTags: Post Data:2009-10-10 10:47:36 Shop Online: https:\/\/www.ShopForSoul.com\/ (Big Data, Cloud, Security, Machine Learning): Courses: http:\/\/Training.SitesTree.com In Bengali: http:\/\/Bangla.SaLearningSchool.com http:\/\/SitesTree.com 8112223 Canada Inc.\/JustEtc: http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) Shop Online: https:\/\/www.ShopForSoul.com\/ Medium: https:\/\/medium.com\/@SayedAhmedCanada","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":69282,"url":"http:\/\/bangla.sitestree.com\/?p=69282","url_meta":{"origin":66330,"position":5},"title":"JSP: Random Information #37","author":"Author-Check- Article-or-Video","date":"August 16, 2021","format":false,"excerpt":"Three JSP constructs: scripting elements, actions, directives Scripting elements: expressions, scriptlets, declarations Expression = translates to println in servlets in _jspService methods < % = expression %> < % = new java.util.Date() %> inserts values directly to the output scriptlet: block of java code : directly inserted into the related\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":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/66330","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=66330"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/66330\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=66330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=66330"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=66330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}