Newsletter |
Why Struts 2, Introduction To Struts Framework
Let us see the quick and brief introduction to struts 2 framework, struts is an open source framework given by Apache software foundation under one of its projects called Jakarta. Struts is the frame work, used to develop web applications for java with mvc2 architecture.
Actually struts 1 was introduced in 2004 and this framework is failed to satisfy the needs of customers in today’s worlds, finally Apache joined with OpenSymphony and created struts2.x.
struts 2 = webwork2 + struts 1
webwork2 is the framework from OpenSymphony, java based mvc2.
You know what, struts 2 is not an extension of struts 1, its the combination of struts 1 and webwork2 some features taken from struts1 and some from webwork2 and finally released this struts2 frame work.
Types of frame works
Frameworks are divided into 2 types,
- Invasive
- Non-Invasive
Invasive means, it will force the programmers to create their classes by extending or implementing from per-defined classes or interfaces provided by that frame work. Non-Invasive means it wont forces the programmer to extend or implement its own classes or interfaces.
Struts is the type of Invasive frame work.
Why struts so popular
- Struts supports extensive validations where other frame works doesn’t
- Having inbuilt support for I18N
- Struts 2 actions classes are spring friendly so we can easily integrate
- In build AJAX themes to make the applications more dynamic
- Finally good frame work for front end based applications, i will explain this point later hah
Struts 2 based on MVC 2 architecture
MVC : Model View Control, am giving real time definitions, i don’t want to confuse you by saying lines of definitions 🙂
Model: Will concentrates on business logic of an application, am going to take bean as model
View: will take cares the presentation, i mean visible part, we are going to use jsp as view for these struts 2 applications
Controller: is a component, which contains all primary logic’s required, like sessions and security and also it contains the entire flow of applications, we are going to use servlet as controller for these struts 2 applications.
Hope you are clear, don’t think much see the next tutorial am promising you that i will make you to understand this struts2 better than what you are expecting 😉
You Might Also Like
::. About the Author .:: | ||
I don’t unremarkably comment but I gotta tell thanks for the post on this one : D.
Hi
Thanks to Java4s.
nice tutorial
Please give real time explanation Generics in java
Hi Java4s..
I found this site today. Started reading the tutorial.. will get back to you once I go in depth 🙂 Thanks guys 🙂
really thanks for simple definition about mvc
very good wb site……………
Really Helpful..Keep it up.
Hi,
Please post EJB tutorial..
Hi Sivateja,
Good website.. Thank you.. Really helpful.. Keep it up.
pl z upload me web services project urgent
hai sir,plz provide some more examples of corejava,in that collection framework.
hi sivateja
java4s is very nice tutorial,easily understandable to everyone.
Nice tutorial.. u r rocking
Hey Siva. Why your saying that MVC is architecture. MVC is not an architecture. MVC is a design pattern. Please correct this.
To create grid I am using struts2-jquery-grid-plugin-3.7.0.jar but after adding to lib my project is not working. Also copied jar files like this–> struts2-jquery-grid-plugin-3.2.1.jar, struts2-jquery-plugin-3.2.1.jar,struts2-json-plugin-2.3.1.2.jar .then also not working. How can I work with grid???
Thank u Sir.Understanding java in easy way
Hi..,
Thanks to java4s
nice tutorial
Thanks to Sivateja sir, very simple explanation about Struts….
Thanks to Sivateja sir, very simple explanation about Struts…
can one create a desktop application using Struts ?
Nice post. Simple and easy to understand.
Great Article.
Excellent work bro… keep going on, in this post i have a doubt in below sentence
"we are going to use servlet as controller for these struts 2 applications." . i think we will use Filter as controller.
Nice tutorials…