Вы находитесь на странице: 1из 12

http://www.java9s.

com
-SRINIVAS REDDY

Struts 2 Tutorial
Introduction to Struts 2

www.java9s.co m

Automates all tedious tasks of application.

Importance of Frameworks

Introduces an elegant architectural Solution. Uses the design patterns commonly agreed and that are standard in the industry. Gives lot of features that are commonly needed by most of the projects.
www.java9s.com

MVC Architecture
Model
Controlle r

View
www.java9s.com

Design Patterns
Front Controller pattern Command Pattern Composite Pattern Decorator Pattern
Front Controller

www.java9s.com

STRUTS 2 BASIC ARCHITECTURE Model


Action
(Domain Object/Command obj)

FilterDispatch er View RESULT


(JSP, AJAX)

Controller

www.java9s.com

Struts 2 Architecture (with Interceptors)


Incoming Request Response

Interceptors

Params Validation Conversion Model-driven

OGNL

Action

Invoke result
OGNL

Result

ActionContext(ThreadLocal) ValueSt App request session ack context www.java9s.com

Struts 1.x Action


FormBean Controller ActionServlet Action

www.java9s.com

Struts 2 Action

FrontContr oller FilterDispat cher

PARAM S

Action Form Fields

www.java9s.com

www.java9s.com

Advantages of Struts 2
An Advanced framework with lot of features. Based on the MVC Architecture. Simple configuration Interceptors to reduce the cross cutting functionality OGNL Pluggable with different Result types like Ajax, JSP, Free Marker, Velocity etc.,

www.java9s.com

Visit www.java9s.com for more videos

www.java9s.com

All rights reserved by java9s.com.

Вам также может понравиться