public class Application extends Controller { static Form form = Form.form(TestData.class); public static Result index() { return ok(index.render(form)); } public static Result submit() { Form filledForm = form.bindFromRequest(); //bindFromRequest returns "a copy of this form filled with the new data" if (filledForm.hasErrors()) { Logger.error("YES YOU HAVE ERRORS"); return badRequest(index.render(filledForm)); //show the form with the data } Logger.debug("Age:"+testData.age); return ok(index.render(form)); } }