Rapidoid - Extremely Fast, Simple and Powerful Java Web Framework!

Serving static files
  • The default locations for serving static files are "public" and "static".
  • All resources that exist in these folders will be automatically served when requested.
Main.java
import org.rapidoid.setup.On;
 
public class Main {
 
    public static void main(String[] args) {
        On.get("/").html("Home");
    }
 
}
c.html
Hello from C!
public/a.html
Hello from A!
static/b.html
Hello from B!
GET /
Home
GET /a.html
Hello from A!
GET /b.html
Hello from B!
GET /c.html
404 Not found!

HTTP server routes information:

Verb Path Zone Content type MVC View name Roles
GET / main html