{"id":66437,"date":"2021-07-19T04:10:06","date_gmt":"2021-07-19T08:10:06","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/lesson-6-handling-request-parameters-with-form-beans-java-short-notes\/"},"modified":"2021-07-19T04:10:06","modified_gmt":"2021-07-19T08:10:06","slug":"lesson-6-handling-request-parameters-with-form-beans-java-short-notes","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=66437","title":{"rendered":"Lesson 6: Handling Request Parameters with Form Beans #Java Short Notes"},"content":{"rendered":"<p><a href='http:\/\/www.justetc.net\/knowledge\/multimedia_training\/displayArticle.php?table=TrainingVideos&amp;articleID=14'>Training Video for this article<\/a> <br \/><a href='codes\/java_struts\/struts-beans.rar'>Code used for this article<\/a>  <\/p>\n<ul>\n<li> In jsp pages, you can create forms with html form tag or html:form tag<\/li>\n<li>Form Beans concept\n<ul>\n<li> You can use request.getParameter() to retrieve data from a form from the backend\/server side. Or you can create a bean based on the form parameters\/values. Then from the server side, you can retrieve values from these beans.  <\/li>\n<li> From server side, you can set output values to the request object directly or you can create a bean to carry output messages to the next step and set the output bean in the request\/session object.<\/li>\n<li> In the output jsp pages, you can use bean:write or jsp expression language to print those output\/result bean values [provided that output values are set into a bean in the server side]<\/li>\n<li> How to declare form beans: Just define a simple Java class that extends ActionForm and then declare it in the struts-config.xml file with form-beans tag<\/li>\n<\/ul>\n<\/li>\n<li> Steps in creating a struts application. This example will follow the same rules\n<ol>\n<li> Modify the struts-config.xml file: declare the form beans, map incoimg .do to action classes, map all possible return strings from action calsses to destination pages<\/li>\n<li> Write the class for the bean that extends ActionForm. Write all the getter and setter methods, write reset method [useful for session scoped beans], write validate method for form input validation<\/li>\n<li> Create the result\/output beans. You do not need to declare them in struts-config.xml file<\/li>\n<li> Define the action class to handle requests and return the right forward string that also need to be mapped in the config file<\/li>\n<li> Create the input pages that calles the actions<\/li>\n<li> Write output jsp pages<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p> From: http:\/\/sitestree.com\/?p=5009<br \/> Categories:Java Short Notes<br \/>Tags:<br \/> Post Data:2010-02-10 16:35:25<\/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>Training Video for this article Code used for this article In jsp pages, you can create forms with html form tag or html:form tag Form Beans concept You can use request.getParameter() to retrieve data from a form from the backend\/server side. Or you can create a bean based on the form parameters\/values. Then from the &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=66437\">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-66437","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":69282,"url":"http:\/\/bangla.sitestree.com\/?p=69282","url_meta":{"origin":66437,"position":0},"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":[]},{"id":66423,"url":"http:\/\/bangla.sitestree.com\/?p=66423","url_meta":{"origin":66437,"position":1},"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":66425,"url":"http:\/\/bangla.sitestree.com\/?p=66425","url_meta":{"origin":66437,"position":2},"title":"JSF: Lesson &#8211; 2: JSF Managed Beans #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 19, 2021","format":false,"excerpt":"Codes for this article Video Demonstration for this article Target: Intermediate level programmers and web-developers. Any programmer\/web-developer can take a look. Pre-requisite: HTML, JSP, Servlet, Tomcat, J2EE, MVC, and JSF Introduction. Check the corresponding sections of this web-site, to have an idea on the required technology knowledge Pre-requisite: Download this\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":10436,"url":"http:\/\/bangla.sitestree.com\/?p=10436","url_meta":{"origin":66437,"position":3},"title":"SaleEntry3.jsp Page that uses the SaleEntry bean, using property=&#8221;*&#8221; to read request parameters and assign them to bean properties","author":"","date":"August 28, 2015","format":false,"excerpt":"SaleEntry3.jsp Page that uses the SaleEntry bean, using property=\"*\" to read request parameters and assign them to bean properties <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Example of using jsp:setProperty and a general association with the input parameters. See SaleEntry1.jsp and SaleEntry2.jsp for alternatives. \u00a0 \u00a0 Taken from Core\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":27084,"url":"http:\/\/bangla.sitestree.com\/?p=27084","url_meta":{"origin":66437,"position":4},"title":"SaleEntry3.jsp Page that uses the SaleEntry bean, using property=&quot;*&quot; to read request parameters and assign them to bean properties #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics","author":"Author-Check- Article-or-Video","date":"May 10, 2021","format":false,"excerpt":"SaleEntry3.jsp Page that uses the SaleEntry bean, using property=\"*\" to read request parameters and assign them to bean properties <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Example of using jsp:setProperty and a general association with the input parameters. See SaleEntry1.jsp and SaleEntry2.jsp for alternatives. Taken from Core Web Programming\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":10434,"url":"http:\/\/bangla.sitestree.com\/?p=10434","url_meta":{"origin":66437,"position":5},"title":"SaleEntry2.jsp Page that uses the SaleEntry bean, using the param attribute to read request parameters and assign them to bean properties","author":"","date":"August 28, 2015","format":false,"excerpt":"SaleEntry2.jsp Page that uses the SaleEntry bean, using the param attribute to read request parameters and assign them to bean properties <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Example of using jsp:setProperty and an explicity association with an input parameter. See SaleEntry1.jsp and SaleEntry3.jsp for alternatives. \u00a0 \u00a0 Taken\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\/66437","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=66437"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/66437\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=66437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=66437"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=66437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}