Hi Rammohan I had also faced problems in understanding struts, I am slowly and consistently learning it. I have prepared some notes for my reference. I have copied almost all of it from manning pubisheser "Struts in Action"). My notes is as follow ################# Struts explanation Struts uses a Model 2 architecture. In model 2 architecture (a) servlets handle the data access and navigational flow, while (b) JSP pages handle the presentation. Model 2 lets Java engineers and HTML developers each work on their own part of the application. A change in one part of a Model 2 application does not mandate a change to another part of the application. HTML developers can often change the look and feel of an application without changing how the back-office servlets work.
(a)The Struts ActionServlet controls the navigational flow. (b) Another Struts class, the Action, is used to access the business classes. (c) When the ActionServlet receives a request from the container, it uses the URI (or “path”) to determine which Action it will use to handle the request. (d) An Action can validate input and access the business layer to retrieve information from databases and other data services. (e) To validate input or use the input to update a database, the Action needs to know what values were submitted. Rather than force each Action to pull these values out of the request, the ActionServlet bundles the input into a JavaBean. (f) The input beans are subclasses of the Struts ActionForm class. The ActionServlet can determine which ActionForm to use by looking at the path of the request, the same way the Action was selected. (g) An ActionForm extends org.apache.struts.action.ActionForm. ### Each HTTP request must be answered with an HTTP response. Usually, a Struts Action does not render the response itself but forwards the request on to another resource, such as a JSP page. Struts provides an ActionForward class that can be used to store the path to a page under a logical name. When it has completed the business logic, the Action selects and returns an ActionForward to the servlet. The servlet then uses the path stored in the ActionForward object to call the page and complete the response. Struts bundles these details together into an ActionMapping object. Each ActionMapping is related to a specific path. When that path is requested, the servlet retrieves the ActionMapping object. The mapping tells the servlet which Actions, ActionForms, and ActionForwards to use. All of these details, the Actions, ActionForms, ActionForwards, ActionMappings, and some other things, are declared in the struts- config.xml file. The ActionServlet reads this file at startup and creates a database of configuration objects. At runtime, Struts refers to the objects created with the configuration file, not the file itself. #### Hope this will help, Please do post your further doubts to the mailing list,with appropriate subject head like "Struts doubts" thanks Joseph John On Oct 25, 8:01 pm, Rammohan Vadlamani <rmmo...@gmail.com> wrote: > Hello Everyone, > I have been following the java passion tutorials since > quite some time now. Now I am into struts. So far each and every section > consisted of a lab and exercise. But this particular section '*Struts Sample > Applications*' consists of only ready to use programs. I could not > understand anything out of this particular section. Could anyone help with > regards to how to understand this section. > > Regards, > > Rammohan -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en