ACT Framework

APL v2 Maven Central Build Status Javadocs Join the chat at Get Support on StackOverflow Feature Requests


Add act-starter-parent into into your pom.xml file


Or use maven archetype to start an new project:

mvn archetype:generate -B \
    -DgroupId=com.mycom.helloworld \
    -DartifactId=helloworld \
    -DarchetypeGroupId=org.actframework \
    -DarchetypeArtifactId=archetype-quickstart \

tips don't forget replace the groupId, artifactId and appName in the above script, or you can use interactive mode to generate your project:

mvn archetype:generate -DarchetypeGroupId=org.actframework -DarchetypeArtifactId=archetype-quickstart -DarchetypeVersion=

Note There are more ActFramework application archetypes for use. Please get them here.


Sample code

A HelloWorld app

package demo.helloworld;

import act.Act;
import act.Version;
import org.osgl.mvc.annotation.GetAction;

public class HelloWorldApp {

    public String sayHelloTo(@DefaultValue("World") String who) {
        return "Hello " + who + "!";

    public static void main(String[] args) throws Exception {


See this 7 mins video on how to create HelloWorld in Eclipse from scratch. or for users without youtube access

A full RESTful service


import act.controller.Controller;
import act.db.morphia.MorphiaAdaptiveRecord;
import act.db.morphia.MorphiaDao;
import org.mongodb.morphia.annotations.Entity;
import org.osgl.mvc.annotation.*;

import java.util.Map;

import static act.controller.Controller.Util.notFoundIfNull;

public class User extends MorphiaAdaptiveRecord<User> {

    public static class Service extends MorphiaDao<User> {

        public User create(User user) {
            return save(user);

        public Iterable<User> list() {
            return findAll();

        public User show(@DbBind("id") User user) {
            return user;

        public User update(@DbBind("id") @NotNull User user, Map<String, Object> data) {
            return save(user);

        public void delete(String id) {

    public static void main(String[] args) throws Exception {


See this 1 hour video on RESTful support or for user without youtube access

See this 7 mins video to understand more about AdaptiveRecord or for user without youtube access


I love PlayFramework v1.x because it is simple, clear and expressive. It brought us a completely different experience in web development with Java. However I don't totally agree with where Play 2.X is heading for, and it looks like I am not the only person with the concern as per this open letter to Play Framework Developers.

I have thought of rolling out something that could follow the road paved by Play 1.x, something that is simple, clear, expressive and Java (specifically) developer friendly. About one and half year after that I decide I could start the project seriously, and now another one and half year passed by, I've got this ACT framework in a relatively good shape.

Happy coding!