AboutBlogContact
Web DevelopmentOctober 30, 2000 2 min read 123Updated: June 22, 2026

Jakarta Struts: Bringing MVC to the Java Web

AunimedaAunimeda
📋 Table of Contents

It’s late 2000, and building a web application in Java often feels like a step backward. We have Servlets and JSPs, but without a clear architecture, we end up with "Model 1" architecture-where JSPs are full of database queries, business logic, and HTML all mixed together. It’s a maintenance nightmare.

The Apache Jakarta project has just released Struts 1.0, and it’s exactly what we need.

The MVC Pattern

Struts implements the Model-View-Controller (MVC) pattern for the web.

  • Model: Your business logic and data (EJBs, DAOs).
  • View: JSPs that use the Struts Tag Library to display data.
  • Controller: The ActionServlet, which dispatches requests to Action classes based on a configuration file.

The struts-config.xml file is the heart of the application. It maps URLs to actions and defines where the user should be sent after an action completes.

<action-mappings>
    <action path="/login" 
            type="com.example.LoginAction" 
            name="loginForm" 
            scope="request" 
            input="/login.jsp">
        <forward name="success" path="/welcome.jsp"/>
        <forward name="failure" path="/login.jsp"/>
    </action>
</action-mappings>

Form Beans

One of the best features is the ActionForm. Struts automatically populates these Java beans from the HTTP request parameters and handles basic validation. No more manually calling request.getParameter() 50 times!

Looking Ahead

Struts is the first "industrial strength" framework for Java web development. It’s going to become the standard for enterprise applications. Of course, it’s not perfect-the XML configuration can get massive, and the inheritance-based model for Actions is a bit rigid.

But compared to the chaos of "Model 1," Struts feels like a professional engineering tool. It’s teaching a whole generation of web developers about the importance of separation of concerns.


Aunimeda develops websites and web applications for businesses - corporate sites, e-commerce, portals, and custom platforms.

Contact us to discuss your web project. See also: Web Development, E-commerce Development

Read Also

Stripe: Finally, a Payments API for Developersaunimeda
Web Development

Stripe: Finally, a Payments API for Developers

Accepting credit cards on the web has always been a nightmare of merchant accounts and clunky gateways. Stripe is here to fix that with a few lines of code.

Hulu: High-Quality Video in the Browseraunimeda
Web Development

Hulu: High-Quality Video in the Browser

NBC and Fox have teamed up to launch Hulu. It's high-quality TV, it's in the browser, and it's free (with ads). Is this the future of television?

Django 0.95 Internals: Custom Request/Response Hooks via Middleware (2006)aunimeda
Web Development

Django 0.95 Internals: Custom Request/Response Hooks via Middleware (2006)

Deep dive into custom request/response hooks in Django 0.95. Learn how to manipulate headers, handle authentication, and transform responses globally.

Need IT development for your business?

We build websites, mobile apps and AI solutions. Free consultation.

Web Development

Get Consultation All articles