Unit02 Struts Notes
Unit02 Struts Notes
Struts is an MVC implementation that uses Servlets 2.2 and JSP 1.1
Struts Tags
Common Attributes
Almost all tags provided by the Struts framework use the following
attributes:
name the name of a pre-existing bean for use with the tag
property the property of the bean named in the name attribute for use
with the tag
scope the scope to search for the bean named in the name attribute
Of course, there is nothing new under the Sun ... and many have been
quick to point out that JSP's Model 2 follows the classic Model-View-
Controller design pattern abstracted from the venerable Smalltalk MVC
framework. Java Web developers now tend to use the terms Model 2
and MVC interchangeably. In this guide, we use the MVC paradigm to
describe the framework architecture, which might be best termed a
Model 2/MVC design.
For more about the Struts taglibs and using presentation pages with
the framework, see the Building View Components section. Additional
documentation regarding the taglibs is also available in the Taglibs
subproject.
Advantages Of Struts:-
can be made by editing a single file. This approach also lets Java
Bean Tags.
HTML Tags.
maintained.
Consistent Approach.
application.
Disadvantages of Struts
standard servlet and JSP APIs alone, due to its complexity it has some
comfortable with the standard JSP and servlet APIs. To use MVC
Worse Documentation.
Compared to the standard servlet and JSP APIs, Struts has fewer
JSP.
Less Transparent.
o Harder to understand
Rigid Approach.
Struts is right for your projects, you should try a simple Struts
application to get a feel for it. Then, carefully weigh the advantages
and disadvantages and decide if all of the Struts benefits outweigh the
The Struts Framework, itself, only fills in the View and Controller
Architecture Overview
All incoming requests are intercepted by the Struts servlet controller.
function.