Search code examples
javaspringstrutsenterprise

why would enterprises use Struts 1 and Spring together


I'm new to Struts 1 and Spring, and I'm curious as to why enterprises integrate them both when they could use either one as a standalone framework. I also do know that Spring has advantages over using Struts 1 such as IOC and DI, so what gives?

My guess would be migration from Struts 1 to Spring, and the use of both is part of the process such as this


Solution

  • Struts (1 or 2) is only a web layer, while Spring includes (more or less) everything.

    Some people simply prefer the Struts model of the web layer (I prefer S2 over Spring MVC, but barely), some systems grew organically, Struts 1 existed before Spring MVC, etc.

    It was very common to use Spring as glue but use Struts as the web layer.