1 / 4

Struts 2 – Architecture

From a high level, Struts2 is a pull-MVC (or MVC2) framework. The Model-ViewController pattern in Struts2 is implemented with the following five core components u2212<br><br>Actions<br>Interceptors<br>Value Stack / OGNL<br>Results / Result types<br>View technologies

Ducat1
Download Presentation

Struts 2 – Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome to Ducat India Language | Industrial Training | Digital Marketing | Web Technology | Testing+ | Database | Networking | Mobile Application | ERP | Graphic | Big Data | Cloud Computing Apply Now Training & Certification 70-70-90-50-90 www.ducatindia.com

  2. Struts 2 – Architecture • From a high level, Struts2 is a pull-MVC (or MVC2) framework. The Model-ViewController pattern in Struts2 is implemented with the following five core components − • Actions • Interceptors • Value Stack / OGNL • Results / Result types • View technologies • Struts 2 is slightly different from a traditional MVC framework, where the action takes the role of the model rather than the controller, although there is some overlap.

  3. Request Life Cycle • Based on the above diagram, you can understand the work flow through user’s request life cycle in Struts 2 as follows − • User sends a request to the server for requesting for some resource (i.e. pages). • The Filter Dispatcher looks at the request and then determines the appropriate Action. • Configured interceptor functionalities applies such as validation, file upload etc. • Selected action is performed based on the requested operation. • Again, configured interceptors are applied to do any post-processing if required. • Finally, the result is prepared by the view and returns the result to the user. • Sturts2 Example • As we have already learnt from the Struts 2 architecture, when you click on a hyperlink or submit an HTML form in a Struts 2 web-application, the input is collected by the Controller which is sent to a Java class called Actions. After the Action is executed, a result selects a resource to render the response. The resource is generally a JSP, but it can also be a PDF file, an Excel spreadsheet, or a Java applet window. • Assuming that you already have built your development environment. Now, let us proceed for building our first Hello World Struts2 project. The aim of this project is to build a web application that collects the user’s name and displays “Hello World” followed by the user name. • Read More: https://tutorials.ducatindia.com/java/struts-2-architecture/

  4. Thank You!! Call us: 70-70-90-50-90 www.ducatindia.com

More Related