Get all updates of Java4s
Follow Us: Email Newsletter

Why Struts 2, Introduction To Struts Framework

Struts » On Aug 17, 2011 { 20 Comments } By Sivateja

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 Author ♦

Java4s_Author
sivateja@java4s.com
Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

20 Responses to “Why Struts 2, Introduction To Struts Framework”
  1. Eustolia Lupu says:

    I don’t unremarkably comment but I gotta tell thanks for the post on this one : D.

  2. satya says:

    Hi
    Thanks to Java4s.
    nice tutorial
    Please give real time explanation Generics in java

  3. sadakar says:

    Hi Java4s..
    I found this site today. Started reading the tutorial.. will get back to you once I go in depth :-) Thanks guys :)

  4. Saravanan M says:

    really thanks for simple definition about mvc

  5. santosh says:

    very good wb site……………

  6. Sachin says:

    Really Helpful..Keep it up.

  7. Siddha says:

    Hi,

    Please post EJB tutorial..

  8. Kishor says:

    Hi Sivateja,

    Good website.. Thank you.. Really helpful.. Keep it up.

  9. sekhar says:

    pl z upload me web services project urgent

  10. rani says:

    hai sir,plz provide some more examples of corejava,in that collection framework.

  11. jyothi says:

    hi sivateja
    java4s is very nice tutorial,easily understandable to everyone.

  12. akshigayu says:

    Nice tutorial.. u r rocking

  13. Hey Siva. Why your saying that MVC is architecture. MVC is not an architecture. MVC is a design pattern. Please correct this.

  14. Jagannath says:

    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???

  15. Supriya says:

    Thank u Sir.Understanding java in easy way

  16. bheeresh says:

    Hi..,
    Thanks to java4s
    nice tutorial

  17. Mohammad Laish says:

    Thanks to Sivateja sir, very simple explanation about Struts….

  18. sodarshan says:

    Thanks to Sivateja sir, very simple explanation about Struts…

  19. Surbhi Gulati says:

    can one create a desktop application using Struts ?

  20. Mithila says:

    Nice post. Simple and easy to understand.

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
Upcoming
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2016 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.