You are on page 1of 3

RTS STRUTS 2.0  Struts 2.0 Course Pre requisites ::  Java (min 1.

5)  Filters,JSP,and Tag Libraries  JavaBeans  HTML and HTTP  Web Containers (such as Tomcat)  XML  Understanding of MVC  Struts 2.0 s/w requirements ::  Java 5  Tomcat 5.5  ,a distribution can be downloaded from the Apache Struts website  Eclipse 3.2(Helios 3.6)  Why choose Struts2? ::  Simple Design :  The Struts2.0 design allows the action classes to be simple POJOs, thus allows loose coupling and portability of classes  Dependency Injection :  Struts 2.0 has a integrated dependency injection engine that manages component lifecycle  Useful Defaults :  Most of the configuration elements have a default value ,which can be set as required  The xml-based default configuration files can be overridden  Rich Tag Library :  Rich set of reusable user interface tags allow easy component- oriented development using themes and templates  Multiple view options :  Struts 2 Results provide flexibility to create multiple type of outputs, this is done using pluggable Result Types that support multiple view technologies,including JSP, FreeMarker,Velocity, PDF,and JasperReports .  Simple integration with other technologies :  Struts 2 Actions are Spring-aware, just need to add Spring beans  Easy integration with Hibernate, Spring, JSTL  Simple Plug-ins :  The simple plugin architecture allows developers to extend the framework just by adding a JAR to the application's classpath  Ajax Tags :  Struts 2 taglib includes several Ajax JSP tags, the AJAX theme gives interactive applications a significant boost  Struts 2 can also return a JSON (JavaScript Object Notation) response, using a plugin  For added value, several Ajax-centric plugins are available  Struts is extensible :  The distribution provides the general-purpose framework, but you can still write your application your way  Struts MVC ::  The Model should do the "heavy lifting", and the Action will act as a "traffic cop" or adapter .  The framework provides type conversion to simplify transferring data between rich domain objects and textonly HTTP requests.

that transverses the entire framework  Mini-MVC-based tag API that supports modifiable and reusable VI components  High-level overview .Struts2 ::  Struts 2 is web application framework that implements the Model-View-Controller (MVC) design pattern  Struts 2 also introduces several new architectural features making it cleaner and more flexible  New Features . ValueStack . Object-Graph Navigation Language (OGNL).and how the parts of the framework work together when processing a request  Controller : org.FilterDispatcher  Model : Action classes provided by developers  View : The Result .Struts2 Core concepts :: Overview of :: New architectural features of Struts2  High level architecture of Struts 2 web application framework  How Struts 2 implements the Model-View-Controller design pattern  Elements of MVC in Struts2  Request Processing life cycle  Interceptors .Struts2 ::  Interceptors for layering cross-cutting concerns away from action logic  Powerful expression language. Struts 2.Struts2 Framework ::  MVC in Struts2 ::  How Struts 2 implements MVC.0 Overview ::  Agenda . OGNL and ActionContext  Configuring Struts2 application  HelloWorld application  Architectural aspects .dispatcher.struts2.apache.

configuration files done with XML-based.  Model .and XSL  The clean architecture allows building more result types to handle new types of responses  Request processing workflow : Overview ::  .Controller : FilterDispatcher ::  FilterDispatcher is a servlet filter that inspects each incoming request to determine which Struts 2 action should handle the request.  You just need to inform the framework which request URLs map to which of your actions .The Result ::  The presentation component of MVC pattern  Action chooses result to render the response  It can choose from any number of results  Struts2 supports common view-layer technologies as results  These include JSP.Velocity.Action classes ::  A Struts 2 action serves two roles o Encapsulates the calls to business logic into a single unit of work o Serves as a means of data transfer between request and Result  Action class can be a simple JavaBean with a execute() method  Or it can be a extension of ActionSupport class to take full advantage of Struts2’s intelligent defaults  View . FreeMarker.