使用@POST方法在Jersey Viewable上的任何示例?
答案 0 :(得分:5)
@POST
@Path("register")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Response register(RegisterRequest request) throws Exception {
HashMap<String, Object> model = new HashMap<String, Object>();
model.put("request", request);
return Response.ok(new Viewable("/register", model)).build();
}