DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Cookies Revisited: A Networking Solution for Third-Party Cookies
  • Using Event-Driven Ansible to Monitor Your Web Application
  • The Blue Elephant in the Room: Why PHP Should Not Be Ignored Now or Ever
  • Azure Deployment Using FileZilla

Trending

  • Enforcing Architecture With ArchUnit in Java
  • The Evolution of Scalable and Resilient Container Infrastructure
  • Supervised Fine-Tuning (SFT) on VLMs: From Pre-trained Checkpoints To Tuned Models
  • Chat With Your Knowledge Base: A Hands-On Java and LangChain4j Guide

Struts Migration Strategies

Ready to make the jump to Struts 2? Here is an overview of the differences between Struts 1 and 2 and how to successfully move your projects.

By 
Kapil Bhardwaj user avatar
Kapil Bhardwaj
·
Sep. 20, 17 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
29.0K Views

Join the DZone community and get the full member experience.

Join For Free

This article talks about the strategies for migrating from  Struts 1.1 to Struts 2.0. The Struts framework is one of the most popular web application frameworks in the Java EE world. It has been widely adapted in enterprises and has been a de-facto standard for web applications. Of late, there have been few areas where the Struts community felt the need to improve on some of the architectural areas. Hence, a new version of Struts, Struts 2.x, was released. Therefore, existing applications need to migrate from Struts 1.x to Struts 2.x to leverage the enhanced features of Struts without rewriting the whole application. This document is an effort to allow you to do that.

Table of Contents

  • Introduction

  • Major changes introduced in Struts 2

  • Migration Strategies 

  • Migration Steps

Introduction

Struts 1.0

  • Officially released in 2001 by Craig McClanahan.
  • Provides a unified framework for deploying Servlet and JSP applications using MVC architecture.
  • Multiple utility classes to handle common tasks.

  •  Reached EOL (End-Of-Life)

Struts 2.0

  • Based on the OpenSymphony WebWork2 framework (MVC2 architecture).

  • Cleaner, extensible, and flexible with annotation-based support.

  • Support for REST, Ajax, JSON with plugin-based architecture.

Major Changes in Struts 2

  • S2 Action Classes are POJOs with execute() instead of mandatorily extending S1 abstract Action classes provided by the framework.
  • S2 Actions are thread-safe, as they are instantiated for each request, as compared to S1 Actions, which are singletons.
  • S2 Action classes are more testable as compared to S1, as execute() exposes the Servlet API.
  • OGNL and Interceptors had been introduced in S2, which makes S1 ActionForms obsolete.
  • Convention-over-Configuration support for annotations (e.g. validations).
  • An S2 ValueStack feature allows accessing objects without coupling views.
  • Enhanced Taglib with support for Ajax.
  • Enhanced View technology with support for Velocity and Freemarker templates and XSLT transformations besides JSP.

Struts 1->2 Migration Strategies

Image title

Migration Steps

Image title

Migration Considerations

Image title

Web application

Opinions expressed by DZone contributors are their own.

Related

  • Cookies Revisited: A Networking Solution for Third-Party Cookies
  • Using Event-Driven Ansible to Monitor Your Web Application
  • The Blue Elephant in the Room: Why PHP Should Not Be Ignored Now or Ever
  • Azure Deployment Using FileZilla

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!