DEV Community

Jason Skowronski
Jason Skowronski

Posted on • Originally published at

Most Popular Java Web Frameworks

As Java has evolved over the years, multiple attempts have been made to simplify development for various use cases. From official standards like Java Enterprise Edition, to community-driven frameworks, Java is continuing to prove itself to be adaptable and viable.

Our top list is based on usage from's Java ranking and several other sources including blog posts and GitHub download numbers.

The top three are:

Other notable Java Web Frameworks:

Java Frameworks that are popular but not for the Web (We don’t want to forget them):


Project Site:

Primary Sponsor: Pivotal Software

Spring is more than just a web framework. It is a complete programming model that is built on and with Java, starting with Spring Boot, which is a way to get a spring application up and running with minimal configuration and no application server required. At the other end of the spectrum is Spring Cloud, which is a combination of components that allows developers to build resilient and reliable cloud-native applications that leverage the latest distributed patterns like a microservices architecture — two examples include application security and batch processing.

There are many use cases for Spring, and with the introduction of Spring Boot, it is a great solution for companies that are moving towards containers as it greatly simplifies the components required to support the running application.

Getting started with Spring is as simple as going to Spring Initializr and selecting the build framework you desire and any and all the Spring projects you want included in the initial application. It will create the Maven or Gradle configuration and all the basic spring configuration required to start.

Creating a simple web application starting with Initializr (Figure 1):

Spring Initializr

… which will create a Zip file with the following files in it:


You need a Controller — src/main/java/com/example/demo/

package com.example.demo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

public class DemoController {

    public String hello() {
        return "hello";


And a template file — src/main/resources/templates/hello.html

    <title>Hello World</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <p>Hello World</p>

JSF (Java Server Faces)

Project Site:

Primary Sponsor: Oracle (soon to be a separate foundation)

JSF is a specification for displaying web user interfaces that is defined as part of the Java Platform, Enterprise Edition (JEE). JSF 1 was released in 2004, incorporated into JEE 5 and uses Java Server Pages (.jsp) as its templates. JSF 2 was released in 2009 as part of JEE 6, and leverages Facelets for templating and supports AJAX calls with a browser to allow modern web application lifecycles. JSF is component-based, allowing it to be expanded with additional components. IceFaces and MyFaces are examples of popular add-on components.

As JSF is part of the Java standard, it is popular with development teams that want to stick to published standards for increased portability across platforms. JSF also allows existing backend Java code to be extended with a web interface without having to refactor the base application by introducing a new framework.

A simple JSF application requires a Managed Bean, Facelet, and mapping the servlet.

package helloworld;

import javax.faces.bean.ManagedBean;

public class HelloWorld {

    final String world = "Hello World!";

    public String getworld() {
        return world;


<html lang="en"
        <title>Facelets Hello World</title>


    <servlet-name>Faces Servlet</servlet-name>
    <servlet-name>Faces Servlet</servlet-name>

GWT (Google Web Toolkit)

Project Site:

Primary Sponsor: Google

GWT is much like JSF in that it is strictly focused on building web interfaces. It is more popular than native JSF as it makes it easy to maintain complex JavaScript user interfaces with Java code. GWT has lost some of its popularity over the last couple of years as more development teams are pushing Java to the backend and having it expose REST APIs which are consumed by both native mobile apps and user interfaces built in Node.js, using frameworks like Angular.

A tutorial on how to build a simple GWT application can be found on its project site: Getting Started building a GWT app.


In summary, there are many viable Java Web Frameworks that can be used to address your needs. None of the top three are bad choices — It comes down to personal preference. Just be aware that once you commit to a framework and start to leverage its features, switching to another framework is not an insignificant amount of work.

Originally published on

Top comments (0)