柳絮飞祭奠 阅读(274) 评论(0)

前端
<form action="/Jersey/api/1.0/my/form" method="post">
		<input type="text" name="name">
		<input type="submit" value="提交">
	</form>



后端
	@POST
	@Path("/form")
	@Produces({ MediaType.APPLICATION_JSON + ";charset=UTF-8" })
	public String form(@FormParam("name") String name) {
		System.out.println(name);
		return "{\"name\":\""+name+"\"}";
	}