Software Alternatives, Accelerators & Startups

Apache Struts VS Thymeleaf

Compare Apache Struts VS Thymeleaf and see what are their differences

Apache Struts logo Apache Struts

Apache Struts is an open-source web application framework for developing Java EE web applications.

Thymeleaf logo Thymeleaf

Thymeleaf is a modern server-side Java template engine for both web and standalone environments.
  • Apache Struts Landing page
    Landing page //
    2022-04-27
  • Thymeleaf Landing page
    Landing page //
    2023-09-26

Apache Struts features and specs

  • Robust Framework
    Apache Struts is a mature and well-established framework for Java web applications, providing stable and reliable tools for enterprise-level applications.
  • MVC Architecture
    Struts adheres to the Model-View-Controller (MVC) design pattern, which separates business logic, presentation, and navigation, making code maintenance and development easier.
  • Extensive Documentation
    Struts has comprehensive documentation and a wealth of online resources, including tutorials, community forums, and user guides, which can support developers throughout their projects.
  • Rich Tag Library
    It comes with a rich set of custom tags that enhance the JSP (JavaServer Pages) to create dynamic web content easily.
  • Plugin Support
    Apache Struts supports various plugins that can extend its functionality, allowing developers to integrate additional features without much effort.

Possible disadvantages of Apache Struts

  • Steep Learning Curve
    New developers might find Struts challenging to learn due to its complexity and the need for a good understanding of the MVC architecture and Java web application development.
  • Configuration Overhead
    The framework requires extensive XML configuration, which can be cumbersome and time-consuming compared to convention-over-configuration frameworks.
  • Performance
    Struts can be slower than some newer, lighter frameworks due to its broader feature set and the overhead associated with its extensive configuration.
  • Security Vulnerabilities
    Struts has had notable security vulnerabilities in the past. Although patches and updates are available, it necessitates proactive monitoring and maintenance.
  • Outdated Compared to Modern Frameworks
    With the advent of modern frameworks like Spring MVC and JavaServer Faces, some developers consider Struts to be less up-to-date with the latest web development standards and practices.

Thymeleaf features and specs

  • Natural Template Approach
    Thymeleaf allows developers to create templates that can be directly opened and edited by designers in browsers, making collaboration between developers and designers easier.
  • Server-Side Rendering
    It provides powerful templating capabilities on the server-side, allowing for dynamic content generation, which is well-suited for web applications that need to process templates on the server.
  • Spring Integration
    Thymeleaf integrates seamlessly with Spring Framework, making it an ideal choice for Spring-based web applications.
  • Rich Features
    Features such as internationalization, decoupled templates, and template inheritance make Thymeleaf a versatile tool for complex applications.
  • HTML5 Support
    Thymeleaf offers excellent support for modern HTML5 standards, ensuring compatibility and future-proofing of web applications.

Possible disadvantages of Thymeleaf

  • Steeper Learning Curve
    Compared to some other templating engines, Thymeleaf has a steeper learning curve, particularly for those not familiar with XML or HTML attribute-based templates.
  • Less Suitable for Highly Interactive UIs
    Since Thymeleaf is a server-side technology, it might not be the best choice for applications requiring highly interactive and dynamically updated UI, which are better served by client-side solutions like React or Angular.
  • Performance Overhead
    The server-side processing of Thymeleaf templates can introduce performance overhead, particularly for large-scale applications with high traffic volumes.
  • Limited Reusability
    Unlike component-based libraries or frameworks, Thymeleaf may have limited reusability of UI components, which can lead to more code duplication.

Apache Struts videos

Finding and Fixing Apache Struts CVE-2017-5638 with Black Duck Hub

More videos:

  • Review - Apache Struts 2 - remote command execution
  • Review - Dark ambient drone music | Vulnerable Apache Struts installation under attack (Java, Jakarta)

Thymeleaf videos

Spring Boot Thymeleaf Form Handling Tutorial

More videos:

  • Review - Using Thymeleaf in Spring Boot
  • Review - 4.4 Thymeleaf Standard Dialect XSD

Category Popularity

0-100% (relative to Apache Struts and Thymeleaf)
Developer Tools
85 85%
15% 15
Javascript UI Libraries
0 0%
100% 100
Web Frameworks
100 100%
0% 0
JS Library
0 0%
100% 100

User comments

Share your experience with using Apache Struts and Thymeleaf. For example, how are they different and which one is better?
Log in or Post with

Reviews

These are some of the external sources and on-site user reviews we've used to compare Apache Struts and Thymeleaf

Apache Struts Reviews

17 Popular Java Frameworks for 2023: Pros, cons, and more
You can integrate Struts with other Java frameworks to perform tasks that aren’t built into the platform. For instance, you can use the Spring plugin for dependency injection or the Hibernate plugin for object-relational mapping. Struts also allows you to use different client-side technologies such as Jakarta Server Pages to build the frontend of your application.
Source: raygun.com
10 Best Java Frameworks You Should Know
Followed by Struts Framework, the next leading framework currently being used in the IT industry is the Wicket.

Thymeleaf Reviews

We have no reviews of Thymeleaf yet.
Be the first one to post

Social recommendations and mentions

Based on our record, Apache Struts seems to be more popular. It has been mentiond 2 times since March 2021. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

Apache Struts mentions (2)

Thymeleaf mentions (0)

We have not tracked any mentions of Thymeleaf yet. Tracking of Thymeleaf recommendations started around Mar 2021.

What are some alternatives?

When comparing Apache Struts and Thymeleaf, you can also consider the following products

Spring Framework - The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform.

React - A JavaScript library for building user interfaces

Grails - An Open Source, full stack, web application framework for the JVM

Vue.js - Reactive Components for Modern Web Interfaces

Spark Mail - Spark helps you take your inbox under control. Instantly see what’s important and quickly clean up the rest. Spark for Teams allows you to create, discuss, and share email with your colleagues

AngularJS - AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.