default functions // ///////////////////////////////////////////////////////////////////// // simply render a page: router.GET().route("/").with(ApplicationController.class, "index"); router.GET().route("/examples").with(ApplicationController.class, "examples"); router.GET().route("/assets/.*").with(AssetsController.class, "serve"); } } public Result flashSuccess(Context context) { Result result = Results.html(); // sets a 18n flash message and adds a timestamp to make sure formatting works Optional<String> flashMessage = messages.get("flashSuccess", context, Optional.of(result), "PLACEHOLDER"); if (flashMessage.isPresent()) { context.getFlashCookie().success(flashMessage.get()); } return result; } src/main/java/conf/Routes.java src/main/java/controllers/ApplicationController.java