Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 901069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:29:54+00:00 2026-05-15T15:29:54+00:00

I would like to know the difference between Struts 1.x and Struts 2.x

  • 0

I would like to know the difference between Struts 1.x and Struts 2.x

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:29:55+00:00Added an answer on May 15, 2026 at 3:29 pm

    The major difference is that in Struts1.x the request directly goes to the servlet, whereas in Struts2.x the request and response traval though the stack of interceptor or filter. The regular logic can be placed in Filter classes and developer can concentrate on the Business Logic. Besides this there is also differences in directory structure.

    It is better to know the differences between Struts1.x and Struts2.x topic wise. Here’s a cite of http://www.geekinterview.com/question_details/64360:


    1. Action Classes

    In Struts 1.x the action classes should extend Action (or DispatchAction) class and the execute method have number of parameter and a ActionForward return type , but In struts 2.x the action class can also be simple pojo having execute method returning only a string without any input parameter.


    2. Servlet Dependancy

    Container does not treat Struts2.x, unlike that of Struts1.x, Actions as a request / response couple and struts2.x action can still access the original request and response.


    3. Getting Input

    • In Struts1.x form beans are used to define properties, getters & setters, in struts2.x getters/setters are defined in action classes itself.
    • Struts1.x form beans class must extend ActionForm or ValidatorForm, but Struts2.x beans can also be POJO.

    4. Testability

    • In Struts1.x execute() method exposes the servlet API for testing.
    • Struts2.x Dependancy Injection be used to simplify the testing process.

    5. Expression Languages

    • Struts1.x JSTL as its expression language, where as Struts2.x uses OGNL(Object Graphic Notation Language) as its expression language which is very strong than JSTL.
    • Struts2.x can also use JSTL.

    6. Type Conversion

    • In Struts1.x properties are almost in String form, Convertors are per class which are not configurable.
    • Struts 2.x uses OGNL for type conversion

    7. Validation

    Server side validation are made in action classes in Struts2.x, a much simpler way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know difference between static variables and global variables in terms
I would like to know what the difference between these instructions is: MOV AX,
I would like to know what is the difference between initializing a static member
Just I would like to know, is there any difference between if (a==5) or
I would like to know if there is a difference in speed between computing
I would like to know the difference between KEEP and UNCATLG. As per my
I would like to know the difference between GWT, GWT-RPC, EXT-GWT and Smart GWT.
Basically I would like to know the difference between: :w and :w! or :wq
Possible Duplicate: Difference between “var” and “object” in C# I would like to know
I would like to know any difference between ordinal and hint value in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.