This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can Struts 1 and 2 coexist in the same web application?

 
Scott Ellis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've started a new job where there is existing code written using the Struts 1 framework. They are open to upgrading to Struts 2, but there exists a substantial amount of code that I would rather not have to migrate right now. If that is the only choice, then it will be considered. But, is there a way to deploy a single web application using both an old Struts 1 application with a Struts 2 application running simutaneously? Keep in mind too that there is a login screen to this application, so the HttpSession has to be the same for both apps.

I've not done much with Struts in the past, so the answer may be obviously no if the web.xml configuration has overlapping tag values.

Thanks for your help.

Scott
 
Scott Ellis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like I found my own answer on the apache struts web site. Here is the applicable section:

Dual processor, shared resources - Add the Struts 2.0 JARs to your exisitng Struts 1.3 application. Configure S2 to handle
*.action requests s and let S1 handle
*.do requests. S1 and S2 can run side by side, within the same web application. Teams can implement new features in the latest version, and migrate older pieces as needed. Optionally, some common resources may be shared between S1 and S2, like messages, validation rules, and Tiles configurations, making for an even smoother migration.


Clear as a bell.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic