A full-stack framework to effortlessly
create web applications with modern Java

bash -c "$(curl -fsSL https://rife2.com/create.sh)"

Java 17+  ·  no install needed  ·  cd into the app and ./bld compile run

RIFE2 is a full-stack framework for building web applications in plain, type-safe Java.

Routing, templates, forms, persistence and tests are all ordinary Java code, with no XML, YAML or reflection magic. The compiler and your IDE understand your whole application, giving you completion, refactoring, navigation and type checking everywhere.

See RIFE2 in action

Each tab is a small, focused example. Try it live runs an interactive playground, served by this site, that exercises it, and every playground links to its own source.

A fully functional web application in a dozen lines


            

Run It!

./bld compile run      # using the bld build tool
./gradlew compile run  # using the Gradle build tool

View It!

http://localhost:8080/hello
Try it live

Served live by rife2.com, which is itself a RIFE2 app. View the source: DemoRouter.java and its template: hello.html

Just the beginning

While the examples above each run live on this page, they show only a small part of what RIFE2 offers, and its layers are built to work together.

These are some of the features:

Full Stack in 2.5MB No Dependencies Web Continuations Bidirectional Templates Server-Sent Events Pure Java Build System

Web

  • Engine with Continuations
  • Clean-URL Path Mapping
  • Out-of-container Testing
  • Form Building
  • Dynamic Validation
  • Server-Sent Events with Replay
  • htmx Integration
  • Customizable Authentication
  • CSRF Protection

Runtime & Deployment

  • Embedded Jetty or Tomcat
  • Virtual Threads by Default
  • Jakarta EE 10/11 War Deployment
  • GraalVM Native Images with Continuations
  • Explicit Java Module
  • Hierarchical Configuration
  • Persisted Scheduler
  • Dependency Injection
  • Workflow Engine with Continuations

Data

  • Database Query Builders
  • Generic Query Manager
  • Declarative Migrations
  • Bean-centric Metadata and Constraints
  • JSON with Bean Conversion
  • Content Management

Templates & Content

  • Bidirectional Logic-less Templates
  • Localization
  • RSS, Atom and JSON Feeds
  • WebJars
  • Resource Abstraction

Tooling

  • Pure Java Build System (bld)
  • IntelliJ IDEA Plugin
  • Gradle Plugin

Virtual threads by default

On Java 21 and later, RIFE2's embedded server runs every request on its own virtual thread, with no configuration. You write ordinary blocking code: a database query, an HTTP call or a file read, parks only that thread instead of tying up a pooled request thread. There is no reactive API and no async plumbing to learn, and blocking code can scale to many concurrent I/O-bound requests because virtual threads are cheap to create and park. When deployed to an external servlet container, RIFE2 leaves request threading to the container. Either way, it fits the rest of RIFE2, which offers the same sequential model: continuations pause and resume a flow across requests, and the workflow engine coordinates concurrent tasks as straight-line code that waits on events.

Built for AI-assisted development

RIFE2's design suits AI coding assistants. Everything is plain, type-safe Java: no XML or YAML, no required annotations, and no reflection magic, so the compiler and the agent both read the application's structure straight from the source. Nothing is hidden: routes are fields, elements are classes, and templates are files, all discoverable by reading the code. The framework is a single 2.5MB jar with zero dependencies, built by bld in plain Java, so there is less machinery to reverse engineer. Out-of-container tests exercise the whole request cycle in memory for a fast compile-and-test loop, and an llms.txt at the site root gives agents an index of the framework's documentation.

Find out more

RIFE2's source code, community and issues can be found on GitHub:
https://github.com/rife2/rife2

About RIFE2

RIFE2 builds on the foundations of the original RIFE framework that was popular from 2002 to 2010. It preserves most of the original features and adds new ones, for a fraction of the footprint and with even greater developer productivity. RIFE2 is created and maintained by Geert Bevin, veteran Java coder and one of the first Java Champions.