Struts2 vs Spring 3

Vivek picture Vivek · Feb 26, 2011 · Viewed 55.6k times · Source

Does anyone know difference between Struts2 and Spring 3 MVC. I know the difference between Struts 1 and Spring 2.5, but what's the advantage Struts2 has over Spring 3 or otherwise.

I tried looking all over web, but there is no comprehensive answer anywhere.

Answer

kvista picture kvista · Feb 26, 2011

Struts2 is really WebWork 2 renamed as Struts2. Consider for a moment the fact that Struts essentially leveraged its own brand name to adopt WebWork as its new base, and that should suggest to you that there was at least some who felt it was very compelling -- one doesn't always throw out their own code base to start anew when they issue a sequel.

That said, I'm not going to tell you that Struts2 is better/worse than Spring 3 MVC. Bottom line is that they are definitely comparable.

If you want more details on how they compare, I suggest you check out Matt Raible's presentations in years past on this topic:

http://raibledesigns.com/rd/entry/my_comparing_jvm_web_frameworks

http://static.raibledesigns.com/repository/presentations/ComparingJavaWebFrameworks-ApacheConUS2007.pdf

including a spreadsheet that compares several of them on various degrees:

http://spreadsheets.google.com/pub?key=0AtkkDCT2WDMXdC1HOEtnUHpCejJMbUhGeGJWUmh5dVE&hl=en&output=html