@ControllerMethodMapping(paths = "/2") public String demoMessage2(HttpParamsRequest req) { req.setMessage("Custom message, Date={0}, Server={1}", new Date(), req.getServerName()); req.setAttribute("OkUrl", new UrlAndParams("/action.jsp").add("act", "Ok!")); req.setAttribute( "AbortUrl", new UrlAndParams("http://www.google.com/search").add("q", "президент Буш")); return "message.jsp"; }
@ControllerMethodMapping(paths = "/1") public String demoMessage1(HttpParamsRequest req) { req.setMessage("Default message, param1={0}", new Date()); req.setAttribute("OkUrl", new UrlAndParams("/action.jsp").p("act", "Ok")); return "message.jsp"; }
@ControllerMethodMapping(paths = "/0") public String demoMessage0(HttpParamsRequest req) { req.setMessage("Default message"); return "message.jsp"; }