Skip to Content
avatar image
Former Member

difference between struts 1.1 and struts2.x

hi,

experts

tell me the diff between difference between struts 1.1 and struts2.x

thanks

subodha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 11, 2009 at 01:59 PM

    hi subodha,

    nice to see u in sdn

    check the [link |http://www.geekinterview.com/question_details/64360]

    some of them documentation about 1.x

    http://struts.apache.org/1.3.10/index.html

    let me know u need any furter info

    bvr

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 15, 2009 at 06:09 AM

    Hi subodha,

    Find out the differences.

    1) 1.1:- The controller servlet is ActionServlet and implements FrontController design pattern

    2.x:- The controller servlet is FilterDispatcher and implements intercepting design pattern

    2) 1.1:- Name of struts configuration file is < any anme>.xml

    2.x:- File name is fixed Struts.xml and location is WEB-INF/classes

    3)1.1:- FormBeans and Action classes are api dependent so unit testing is difficult.

    2.x:- No formbeans and Action classes are normal java classes (POJO model) so unit testing is easy. can use JUNIT tool.

    4) Inthe place of Request Processors , interceptors are given.

    5) 1.1:-Thread safety is required in Action subclasses because there will be single object and multiple threads created for multiple requests.

    2.x:- For every request one object will be created for Action class.

    6) 1.1:- Huge complexity to work with spring,hibernate and Ajax.

    2.x:- Built in support to with spring,hibernate and Ajax.

    7) 1.1:- XML files are dtd based.

    2.x:- XML files are schema based.

    8) 1.1:- Given basewd on j2sdk 1.4

    2.x:- Given basewd on j2sdk 1.5 ,so there is a support os Annotations.

    9) 1.1:- Uses validator framework declerative validations.

    2.x:- Uses Xframe work to perform form validations.

    10) 1.1:- Uses jsps as view layer technology.

    2.x:- Uses jsps,freemaker,velocity as view layer technology.

    If u got the answer pls close the thread.

    Regards,

    Sri

    Edited by: Srikanth Thatipally on Apr 15, 2009 8:09 AM

    Add comment
    10|10000 characters needed characters exceeded