0% found this document useful (0 votes)
52 views3 pages

Rts Struts 2.0

The document provides an overview of Struts 2.0, including its prerequisites, software requirements, advantages, and MVC implementation. Struts 2.0 is a web application framework that uses the MVC pattern. It introduces features like interceptors, a powerful expression language, and reusable tags. The framework implements MVC with the FilterDispatcher as controller, action classes as model, and results as view. Actions coordinate business logic and data transfer between requests and results.

Uploaded by

Dinabondhu Ghosh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views3 pages

Rts Struts 2.0

The document provides an overview of Struts 2.0, including its prerequisites, software requirements, advantages, and MVC implementation. Struts 2.0 is a web application framework that uses the MVC pattern. It introduces features like interceptors, a powerful expression language, and reusable tags. The framework implements MVC with the FilterDispatcher as controller, action classes as model, and results as view. Actions coordinate business logic and data transfer between requests and results.

Uploaded by

Dinabondhu Ghosh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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

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 struts-2.0.6-all.zip ,a distribution can be downloaded from the Apache Struts websitehttp://struts.apache.org/downloads.html 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.

Struts 2.0 Overview :: Agenda - 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 , ValueStack , OGNL and ActionContext Configuring Struts2 application HelloWorld application Architectural aspects - 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 - Struts2 :: Interceptors for layering cross-cutting concerns away from action logic Powerful expression language, Object-Graph Navigation Language (OGNL), that transverses the entire framework Mini-MVC-based tag API that supports modifiable and reusable VI components High-level overview - Struts2 Framework ::

MVC in Struts2 :: How Struts 2 implements MVC,and how the parts of the framework work together when processing a request Controller : org.apache.struts2.dispatcher.FilterDispatcher Model : Action classes provided by developers View : The Result

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 ,configuration files done with XML-based. Model - 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 Struts2s intelligent defaults View - 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, FreeMarker,and XSL The clean architecture allows building more result types to handle new types of responses Request processing workflow : Overview ::

You might also like