Overview

Model-View-Controller, or MVC for short, is a common pattern in Web frameworks where it is used predominantly to build HTML applications. The model refers to the application’s data, the view to the application’s data presentation and the controller to the part of the system responsible for managing input, updating models and producing output.

Web UI frameworks can be categorized as action-based or component-based. In an action-based framework, HTTP requests are routed to controllers where they are turned into actions by application code; in a component-based framework, HTTP requests are grouped and typically handled by framework components with little or no interaction from application code. In other words, in a component-based framework, the majority of the controller logic is provided by the framework instead of the application.

The API defined by this specification falls into the action-based category and is, therefore, not intended to be a replacement for component-based frameworks such as Jakarta Faces, but simply a different approach to building Web applications on the Jakarta EE platform.

The Jakarta MVC API is layered on top of Jakarta RESTful Web Services and integrates with existing Jakarta EE technologies like Jakarta Contexts and Dependency Injection and Jakarta Bean Validation.

Hello World Example

@Path("hello")
public class HelloController {

    @Inject
    private User user;

    @GET
    @Controller
    public String hello(@QueryParam("name") String name) {
        user.setName(name);
        return "hello.jsp";
    }
}

Releases

The latest version is available via Maven:

<dependency>
  <groupId>jakarta.mvc</groupId>
  <artifactId>jakarta.mvc-api</artifactId>
  <version>2.0.0</version>
</dependency>

Latest news

2020-12-21

Jakarta MVC 2.0 Released

We are very proud to announce that Jakarta MVC 2.0 has been released. You can get the final version…

2020-02-17

MVC 1.0 Final Release

We are very proud to announce that MVC 1.0 Final has been released. You can get the final version…

2019-10-28

Eclipse Krazo 1.0.0-Beta1 released

We are very proud to announce that we have just release Eclipse Krazo 1.0.0-Beta1. This is a very…