Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 57311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:40:17+00:00 2026-05-10T17:40:17+00:00

I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a

  • 0

I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a specific question regarding Actions. Most of the pages have exactly one Action, and the processExecute() methods are hideous monsters (very long and tons of nested if statements based on request parameters).

Given that Actions are an implementation of the command pattern, I’m thinking to split these Actions into one Action per user gesture. This will be a large refactoring though, and I’m wondering:

  1. Is this the right direction?
  2. Is there an intermediate step I could take, a pattern that deals with the mess inside the monolithic actions? Maybe another command pattern inside the Action?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:40:17+00:00Added an answer on May 10, 2026 at 5:40 pm

    My way of dealing with this would be:

    • dont do ‘everything at once’
    • whenever you change anything, leave it better than you found it
      • replacing conditionals with separate Action implementations is one step.
      • Better yet: Make your implementations separate from the Action classes so that you can use it when you change frameworks
      • Keep your new Command implementation absolutely without references to Struts, use your new Actions as Wrapper around these implementations.
      • You might need to provide interfaces to your Struts ActionForms in order to pass them around without copying all the data. On the other hand – you might want to pass around other objects than ActionForms that are usually a bunch of Strings (see your other question about Struts 1.2 ActionForms)
    • start migrating parts to newer & better technology. Struts 1.2 was great when it came out, but is definitely not what you want to support in eternity. There are some generations of better frameworks now.

    There’s definitely more – Sorry, I’m running out of time here…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my JEE6-CDI-webapp, i declared a Security Interceptor, like this one: //Secure.java @Inherited @Target({TYPE,
I have seen this question http://www.careercup.com/question?id=384062 class Base { public : virtual void method
I've recently inherited a project primarily done in C++, so this is my first
I've just inherited a projected with a lot of client side validation. In this
I inherited a project with the following reference in one class: using ImportFile I
I inherited this old TurboBasic code base, and I am converting it to something
I inherited this piece of code and it seems sub-optimal and possibly incorrect since
So I inherited this Android project from someone else. The code currently seems to
So I'm pretty new to Visual Basic and inherited this VB6 code that i
I have multiple web sites for my clients and each client has a directory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.