Struts 1 vs Struts 2

Here are few comparison of Jakarta Struts framework version 1.X and 2.X
The entire approach has been changed in Struts 2 by introduction of dependency injection and interceptors. Here are few key differences...


1. Servlet Dependency:


Actions in Struts1 have dependencies on the servlet API since the HttpServletRequest and HttpServletResponse objects are passed to the execute method when an Action is invoked.

In case of Struts 2, Actions are not container dependent because they are made simple POJOs. In struts 2, the servlet contexts are represented as simple Maps which allows actions to be tested in isolation. Struts 2 Actions can access the original request and response, if required. However, other architectural elements reduce or eliminate the need to access the HttpServetRequest or HttpServletResponse directly.

2. Action classes

Struts 1 requires Action classes to extend an abstract base class. Extending an abstract class instead of interface is one of design issues of struts 1.x framework that has been resolved in the struts 2 framework.
In case of Struts 2 Action class may or may not implement interfaces to enable optional and custom services. In case of Struts 2 , Actions are not container dependent because they are made simple POJOs. Struts 2 provides a base ActionSupport class to implement commonly used interfaces. Albeit, the Action interface is not required. Any POJO object with an execute signature can be used as an Struts 2 Action object. Struts 2 also provides a way to maintain action objects using spring container.

3. Validation


Struts1 and Struts 2 both supports the manual validation via a validate method.
Struts1 uses validate method on the ActionForm, or validates through an extension to the Commons Validator. However, Struts 2 supports manual validation via the validate method and the XWork Validation framework. The Xwork Validation Framework supports chaining validation into sub-properties using the validations defined for the properties class type and the validation context.

4. Threading Model

In Struts1, Action resources must be thread-safe or synchronized. So Actions are singletons and thread-safe, there should only be one instance of a class to handle all requests for that Action. The singleton strategy places restrictions on what can be done with Struts1 Actions and requires extra care to develop. However in case of Struts 2, Action objects are instantiated for each request, so there are no thread-safety issues. (In practice, servlet containers generate many throw-away objects per request, and one more object does not impose a performance penalty or impact garbage collection.)

5. Testability

Testing Struts1 applications are a bit complex. A major hurdle to test Struts1 Actions is that the execute method because it exposes the Servlet API. A third-party extension, Struts TestCase, offers a set of mock object for Struts1. But the Struts 2 Actions can be tested by instantiating the Action, setting properties and invoking methods. Dependency Injection support also makes testing simpler. Actions in struts2 are simple POJOs and are framework independent, hence testability is quite easy in struts2.

6. Harvesting Input

Struts1 uses an ActionForm object to capture input. And all ActionForms needs to extend a framework dependent base class. JavaBeans cannot be used as ActionForms, so the developers have to create redundant classes to capture input.
However Struts 2 uses Action properties (as input properties independent of underlying framework) that eliminates the need for a second input object, hence reduces redundancy. Additionally in struts2, Action properties can be accessed from the web page via the taglibs. Struts 2 also supports the ActionForm pattern, as well as POJO form objects and POJO Actions. Even rich object types, including business or domain objects, can be used as input/output objects.

7. Expression Language

Struts1 integrates with JSTL, so it uses the JSTL-EL. The struts1 EL has basic object graph traversal, but relatively weak collection and indexed property support. Struts 2 can also use JSTL, however it supports a more powerful and flexible expression language called "Object Graph Notation Language" (OGNL).

8. Binding values into views

In the view section, Struts1 uses the standard JSP mechanism to bind objects (processed from the model section) into the page context to access. However Struts 2 uses a "ValueStack" technology so that the taglibs can access values without coupling your view to the object type it is rendering. The ValueStack strategy allows the reuse of views across a range of types which may have the same property name but different property types.

9. Type Conversion

Usually, Struts1 ActionForm properties are all Strings. Struts1 uses Commons-Beanutils for type conversion. These type converters are per-class and not configurable per instance. However Struts 2 uses OGNL for type conversion. The framework includes converters for basic and common object types and primitives.

10. Control Of Action Execution

Struts1 supports separate Request Processor (lifecycles) for each module, but all the Actions in a module must share the same lifecycle. However Struts 2 supports creating different lifecycles on a per Action basis via Interceptor Stacks. Custom stacks can be created and used with different Actions as needed.


Comparison of struts 2 with struts 1, comparing struts 1 and Struts 2, struts 1 or struts 2 which one to use, struts 2 vs struts 1

246 Post Comment

«Oldest   ‹Older   201 – 246 of 246   Newer›   Newest»
maverick said...

Idn Play
Hey dude please reply thankyou

maverick said...

Situs Domino
thx 4 sharing I see this post very usefull

a2ss said...


I like the valuable information you provided in your article. I will bookmark your blog and check back often here. I am sure I will learn many new things here! Good luck for the next!
Thank you for sharing.
pokerdex
pokeremas
pokerpelangi
pokerpelangi
promodomino
prupoker
pusatqq
qiuqiu99
remi13
royalpoker99

arianapham said...

Wonderful article, thanks for putting this together

fireboy and watergirl

dewagaming3033 said...

Poker Online Terpercaya
Poker Online Terbaik
ceme bandar poker
ceme idn poker
capsa poker
domino ceme
idnplay ceme
dominoqq poker
poker iphone
Situs Poker Terbaru
thxyou 4 information

fr said...

Pengen ngedate dengan pacar tidak punya motor? kebetulan nih DewiFortunaQQ mengadakan Gebyar Bonus TurnOver Bulanan, dengan hadiah utama 1 unit Honda PCX 150 seharga Rp. 29.000.000 tanpa di undi.

Situs IDN Poker Online

avgcomretail said...

AVG antivirus is the top of the line antivirus for the assurance of your computerized gadgets. It is intended to keep you protected and secure. It secures your significant information and documents, out of the compass of programmers. www.avg.com/retail
It examines the information put away in your PC regardless of whether you are away from your PC.

Anonymous said...

Trik menang main di Bandar Togel Bonus Terbesar Terpercaya Tahun 2020 di Asia. Dapatkan bonus deposit setiap hari sebesar 5000 rupiah.

maverick said...

Slot terbaru terima kasih atas informasinya

master seo indonesia said...


togel online terpercaya
bandar togel


jasa seo indonesia


Poker online
Poker Uang Asli


Prediksi Bola
Jadwal Bola
Agen Bola



dominoqq
bandarqq
poker qq online
pkv games

master seo indonesia said...

togel online terpercaya
bandar togel


jasa seo indonesia


Poker online
Poker Uang Asli


Prediksi Bola
Jadwal Bola
Agen Bola



dominoqq
bandarqq
poker qq online
pkv games

Situs Judi Online said...

Di Pokercuan anda akan mendapatkan keuntungan yang nyata, poker apabila anda menjadi member dari Situs ini. Jadi ada bonus yang tersedia misalkan saja seperti bonus New Member sebesar 50%, Bonus Deposit harian sebesar 10% Dan bonus Rolingan 0,5%. Untuk bonus new member, akan di berikan langsung loh tanpa syarat ribet, dengan pemberian yang akan berlangsung pada 2 tahap 20% diawal dan 30%nya pada deposit kedua hari yang sama.

Bbet99 said...

Bbet99 as a trusted online soccer betting site provides a variety of online gambling games and soccer markets from the biggest league to the smallest league. do not forget that there is an Indonesian league which is more livened up to this gambling ball game you can get only at https://bbet99.fun/
BOLA ONLINE
Agen Bola
Taruhan Bola

Bokir bokek said...

di tahun baru 2020 ini, kami selaku Situs Poker Online indonesia terbaik, menawarkan anda para penggemar poker online untuk bergabung. Kami menyediakan banyak sekali fasilitas permainan terlengkap dan terseru untuk para pecinta Poker338
mania dengan minimal deposit idr 10 ribu saja, segera bergabung dan menangkan jackpot ratusan juta.

Pokernet88 said...

Pokernet88 adalah Agen Poker Online Terpercaya Terbaik, Situs Judi Online Agen IDN Poker Online dan Bandar Ceme, Domino Qiu Qiu, Capsa Susun, DominoQQ uang asli indonesia.

Poker Online
Situs Poker Idn Online
Bandar Poker Idn
Agen Idn Poker Online
Agen Idn Poker

JokerPro said...

It’s nearly impossible to find educated people for this topic, but you sound like you know what you’re talking about! Thanks
Agen Slot
Joker Slot
JokerVIP
Tembak Ikan
Slot online

DewiDomino said...

Thanks a lot for giving everyone an extremely breathtaking chance to read from this blog.
It is always so lovely and jam-packed with a great time for me personally and my office peers to visit the blog
not less than three times in a week to see the fresh issues you have. http://202.95.10.185

Situs Poker Online Terpercaya BandarQ QQ - DewiDomino.com

DewiDomino merupakan Agen BandarQ QQ Online Resmi Terpercaya Indonesia dan Situs Judi Poker V 88 Pakai Uang Asli Deposit Via Pulsa,OVO,GOPAY,Bandar Capsa Susun,Domino, Adu Q Domino99 dan Ceme Terbaik

Poker Via Pulsa
QQ Online
Judi Via Pulsa
Domino Pakai Pulsa
Poker Online

Pokernet88 said...

Pokernet88 adalah Agen Poker Online Terpercaya Terbaik, Situs Judi Online Agen IDN Poker Online dan Bandar Ceme, Domino Qiu Qiu, Capsa Susun, DominoQQ uang asli indonesia.

Poker Online
Situs Poker Idn Online
Bandar Poker Idn
Agen Idn Poker Online
Agen Idn Poker

IndiPoker said...

Indipoker merupakan Situs layanan Judi Online dan Agen IDN Poker 88 Play Terpercaya Dengan Permainan Bandar Judi Ceme Online Terpercaya Keliling,Domino Qiu Qiu,Bandar qq dan Capsa Susun

Idn Poker
Ceme Online
qq
Bandar Judi Ceme
Poker Online

avgcomretail said...

AVG antivirus is the highest point of the line antivirus for the confirmation of your automated contraptions. It is expected to keep you ensured and secure. It verifies your critical data and archives, out of the compass of software www.avg.com/retail
. It analyzes the data set away in your PC paying little respect to whether you are away from your PC.

Total4D said...

exploring for a little for any high quality articles or weblog posts on this sort of area .
Exploring in Yahoo I at last stumbled upon this site. Reading this info So i’m glad to express that I’ve an incredibly good uncanny feeling I came upon just what I needed.
I most definitely will make certain to do not disregard this website http://total4d3.com

Total4D adalah bandar judi dan agen togel online terbesar dan terpercaya WLA tentang angka jitu SGP,hongkong,sidney dan data info keluaran togel hari ini yg terbaru.

WLA
SGP
Togel
Hongkong

Agen Togel Online
Togel Online
Togel Singapore
Bandar Togel Terpercaya

Total4D said...

exploring for a little for any high quality articles or weblog posts on this sort of area .
Exploring in Yahoo I at last stumbled upon this site. Reading this info So i’m glad to express that I’ve an incredibly good uncanny feeling I came upon just what I needed.
I most definitely will make certain to do not disregard this website http://total4d3.com

Total4D adalah bandar judi dan agen togel online terbesar dan terpercaya WLA tentang angka jitu SGP,hongkong,sidney dan data info keluaran togel hari ini yg terbaru.

WLA
SGP
Togel
Hongkong

Agen Togel Online
Togel Online
Togel Singapore
Bandar Togel Terpercaya

BandarXL said...

There was a re-occurring theme all week long. Managers in every department are hungry for data that
will give them improved insight into their operations, and they’re frustrated with the difficulty
of acquiring that data without http://13.251.223.198/

Situs Judi Deposit Pakai Pulsa - Agen Casino Online | Slot Online | BandarXL

BandarXL merupakan Agen Slot Pulsa Online Resmi Indonesia Deposit Pakai Pulsa Via OVO, Telkomsel, XL, dan GOPAY di Asia yang menyediakan permainan Situs Slot, Casino Online, Bandar Taruhan Bola Sbobet Terpercaya, Poker Online, Togel, Keno, dan Lotere.

Situs Slot
Slot Pulsa
Slot Via Pulsa
Agen Slot Pulsa
Casino Online
Slot Online

BandarXL said...

There was a re-occurring theme all week long. Managers in every department are hungry for data that
will give them improved insight into their operations, and they’re frustrated with the difficulty
of acquiring that data without http://13.251.223.198/

Situs Judi Deposit Pakai Pulsa - Agen Casino Online | Slot Online | BandarXL

BandarXL merupakan Agen Slot Pulsa Online Resmi Indonesia Deposit Pakai Pulsa Via OVO, Telkomsel, XL, dan GOPAY di Asia yang menyediakan permainan Situs Slot, Casino Online, Bandar Taruhan Bola Sbobet Terpercaya, Poker Online, Togel, Keno, dan Lotere.

Situs Slot
Slot Pulsa
Slot Via Pulsa
Agen Slot Pulsa
Casino Online
Slot Online

BandarXL said...

There was a re-occurring theme all week long. Managers in every department are hungry for data that
will give them improved insight into their operations, and they’re frustrated with the difficulty
of acquiring that data without http://13.251.223.198/

Situs Judi Deposit Pakai Pulsa - Agen Casino Online | Slot Online | BandarXL

BandarXL merupakan Agen Slot Pulsa Online Resmi Indonesia Deposit Pakai Pulsa Via OVO, Telkomsel, XL, dan GOPAY di Asia yang menyediakan permainan Situs Slot, Casino Online, Bandar Taruhan Bola Sbobet Terpercaya, Poker Online, Togel, Keno, dan Lotere.

Situs Slot
Slot Pulsa
Slot Via Pulsa
Agen Slot Pulsa
Casino Online
Slot Online

DewiDomino said...

Thanks a lot for giving everyone an extremely breathtaking chance to read from this blog.
It is always so lovely and jam-packed with a great time for me personally and my office peers to visit the blog
not less than three times in a week to see the fresh issues you have. http://202.95.10.185

Situs Poker Online Terpercaya BandarQ QQ - DewiDomino.com

DewiDomino merupakan Agen BandarQ QQ Online Resmi Terpercaya Indonesia dan Situs Judi Poker V 88 Pakai Uang Asli Deposit Via Pulsa,OVO,GOPAY,Bandar Capsa Susun,Domino, Adu Q Domino99 dan Ceme Terbaik

Poker Via Pulsa
QQ Online
Judi Via Pulsa
Domino Pakai Pulsa
Poker Online

DewiDomino said...

Thanks a lot for giving everyone an extremely breathtaking chance to read from this blog.
It is always so lovely and jam-packed with a great time for me personally and my office peers to visit the blog
not less than three times in a week to see the fresh issues you have. http://202.95.10.185

Situs Poker Online Terpercaya BandarQ QQ - DewiDomino.com

DewiDomino merupakan Agen BandarQ QQ Online Resmi Terpercaya Indonesia dan Situs Judi Poker V 88 Pakai Uang Asli Deposit Via Pulsa,OVO,GOPAY,Bandar Capsa Susun,Domino, Adu Q Domino99 dan Ceme Terbaik

Poker Via Pulsa
QQ Online
Judi Via Pulsa
Domino Pakai Pulsa
Poker Online

DewiDomino said...

Thanks a lot for giving everyone an extremely breathtaking chance to read from this blog.
It is always so lovely and jam-packed with a great time for me personally and my office peers to visit the blog
not less than three times in a week to see the fresh issues you have. http://202.95.10.185

Situs Poker Online Terpercaya BandarQ QQ - DewiDomino.com

DewiDomino merupakan Agen BandarQ QQ Online Resmi Terpercaya Indonesia dan Situs Judi Poker V 88 Pakai Uang Asli Deposit Via Pulsa,OVO,GOPAY,Bandar Capsa Susun,Domino, Adu Q Domino99 dan Ceme Terbaik

Poker Via Pulsa
QQ Online
Judi Via Pulsa
Domino Pakai Pulsa
Poker Online

Mac Smith said...

If you are looking for best quality shower heads online then you have reached to the right place. Nzhomeware is one of the leading and well-known company in Auckland. We provide you a wide range of shower heads. You can choose as per your interior design of bathroom. Here we help you with various designs and brands od shower heads. Contact us now!

Bbet99 said...

Bbet99 as a trusted online soccer betting site provides a variety of online gambling games and soccer markets from the biggest league to the smallest league. do not forget that there is an Indonesian league which is more livened up to this gambling ball game you can get only at https://bbet99.fun/
BOLA ONLINE
Agen Bola
Taruhan Bola

Total4D said...

exploring for a little for any high quality articles or weblog posts on this sort of area .
Exploring in Yahoo I at last stumbled upon this site. Reading this info So i’m glad to express that I’ve an incredibly good uncanny feeling I came upon just what I needed.
I most definitely will make certain to do not disregard this website http://total4d3.com

Total4D adalah bandar judi dan agen togel online terbesar dan terpercaya WLA tentang angka jitu SGP,hongkong,sidney dan data info keluaran togel hari ini yg terbaru.

WLA
SGP
Togel
Hongkong

Agen Togel Online
Togel Online
Togel Singapore
Bandar Togel Terpercaya

IndiPoker said...

Indipoker merupakan Situs layanan Judi Online dan Agen IDN Poker 88 Play Terpercaya Dengan Permainan Bandar Judi Ceme Online Terpercaya Keliling,Domino Qiu Qiu,Bandar qq dan Capsa Susun

Idn Poker
Ceme Online
qq
Bandar Judi Ceme
Poker Online

Bbet99 said...

Bbet99 as a trusted online soccer betting site provides a variety of online gambling games and soccer markets from the biggest league to the smallest league. do not forget that there is an Indonesian league which is more livened up to this gambling ball game you can get only at https://bbet99.fun/
BOLA ONLINE
Agen Bola
Taruhan Bola

Maria Jhon said...

http://tachesdhuile.blogspot.com/2011/11/tip-of-really-idiotic-iceberg.html

Bbet99 said...

Bbet99 as a trusted online soccer betting site provides a variety of online gambling games and soccer markets from the biggest league to the smallest league. do not forget that there is an Indonesian league which is more livened up to this gambling ball game you can get only at https://bbet99.fun/
BOLA ONLINE
Agen Bola
Taruhan Bola

Cochin Passion said...

Cochin Escorts

Escorts in Cochin

Independent Escorts in Cochin

Cochin Escorts Models

Escorts Service in Cochin

arianapham said...

The article is very helpful for us, please update daily through y8
age of wonder 2 the lost scrolls so I know more useful information.

nuvigarmin said...

garmin map
garmin map update
update garmin map
free garmin map update
garmin map free download 2019
free garmin map update 2017
garmin gps map update free download
garmin map updates download
garmin nuvi update free 2016
garmin map updater problems
download garmin map free
free nuvi map update
garmin gps updates free 2016
how to get free garmin map updates

garmin express free download

Julia Cristine said...

Simply wanted to inform you not sure is it correct replacement Great efforts made here keep the effort
Definitely a great post. I'm and software problems that you have people like me

Login Indipoker
Link Alternatif
Link Alternatif Pokernet88
Daftar Pokernet88
Pokernet88
Login Pokernet88
Daftar Idn Poker

jacob said...

Aol Desktop Gold Downloadis a faster and most secure software for Windows and Mac. You can follow step by step instructions to get Aol Desktop Gold Software.

nila said...

qiuqiu99
zonakiu.info
camarqq
pesiarqq
juraganqq
nikmatqq
memoriqq
wededomino
winnipoker
https://kronospoker.biz

nila said...

cebanqq
hebatqq
ladangqq
ladangqq
nikmatqq
championqq
cebanqq
cebongqq
http://199.188.201.133/
qiuqiu99

Julia Cristine said...

Simply wanted to inform you not sure is it correct replacement Great efforts made here keep the effort
Definitely a great post. I'm and software problems that you have people like me

Login Indipoker
Link Alternatif
Link Alternatif Pokernet88
Daftar Pokernet88
Pokernet88
Login Pokernet88
Daftar Idn Poker

Kenwood said...

Appliance repair is a service that you can get if you want to repair an appliance, or if you want to maintain the proper condition of all the appliances in your house. Stove Repair Service in Riverside

annie liscon said...

Xfinity or Xfinity Stream is a streaming service that offers live broadcast stations, DVR records, linear cable stations and on-demand videos. You are able to watch live TV stations from almost 200+ favorite networks. It's also possible to download on-demand videos for offline access. In the following guide, we'll illustrate how to set up and activate the Xfinity Stream program on Roku devices. Presently, Xfinity is available in a beta version for Roku platforms, also it does not incorporate the whole set of functionality and features contained in the very first versions.For activating xfinity channel on roku visit : xfinity.com/authorize

Lynne Brant said...

Awesome, thanks for sharing.

yogatrade | dartmouth | cutoutandkeep | managewp

«Oldest ‹Older   201 – 246 of 246   Newer› Newest»

Post a Comment

Search Web......