7879808182838485
Long ts = (Long)request.getAttribute("ts"); if (ts == null) { ts = System.currentTimeMillis(); request.setAttribute("ts", ts); } return new HTMLPage() .withH2Content(String.valueOf(ts)); }
8586878889909192
} @Action("get-inj") public View getInjAction() { return new HTMLPage() .withH2Content(Integer.toHexString(System.identityHashCode(someService))); }
25262728293031
public class AfterController { @Action("index") public View someAction() { return new HTMLPage(); }
3132333435363738
} @AfterAction public View afterAction() { return new HTMLPage() .withH1Content("after/index"); }
33343536373839
return new Redirect("/mvc/serv/redirecting"); } @DefaultAction public View defAction() { return new HTMLPage().withH1Content("redirected!"); }
35363738394041
@Inject private HttpServletRequest request; @DefaultAction public View defaultAction() { return new HTMLPage(); }
4041424344454647
return new HTMLPage(); } @Action("some-action") public View doSomething() { return new HTMLPage() .withH2Content("annot/some-action " + getParameter("var")); }
46474849505152
return new JSON(json); } @DefaultAction public View defaultAction() { return new HTMLPage(); }
2526272829303132
public class BeforeController { @BeforeAction public View beforeAction() { return new HTMLPage() .withH1Content("before/index"); }
32333435363738
} @Action("index") public View someAction() { return new HTMLPage(); }