【发布时间】:2012-02-20 09:04:41
【问题描述】:
我正在开发一个网络应用程序,其中有一个类似的表单
<form name="form" action="create-user" method="post">
<input name="accept" type="checkbox"><span>{{acceptLegalTerms}}</span><br>
<input type="submit" value="{{Continue}}" class="primary fright"/>
</form>
在服务器端,我们使用的是 Jersey(在 GAE 上)。这就是我试图用来读取 POST 值的内容
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Path("create-user")
public Response createUser(@FormDataParam("accept") boolean acceptForm) {
return Response.ok().entity(acceptForm).build();
}
但它不起作用...它返回我...
HTTP ERROR 415
Problem accessing /login/create-user. Reason:
Unsupported Media Type
有什么想法吗?我做错了什么?
谢谢!
【问题讨论】:
标签: java google-app-engine jersey