register.jsp
<body>
<div id="container" >
<div id="header-container">
<div id="header">
<div id="logo"><h2>Loc</h2></div>
</div>
</div>
<hr id="line">
<div id="content">
<form name="newUserForm" onsubmit="return validate()" method="POST" action="rest/user/registerUser">
RegisterUser.java
@Path("/registerUser")
@POST
//@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Produces(MediaType.APPLICATION_JSON)
public LocResponse registerUser (
@FormParam("userName") String userName,
@FormParam("userEmail") String userEmail,
@FormParam("loginIp") String loginIp,
@FormParam("userGrp") String userGrp,
@FormParam("pwd") String password,
)
We are using Jersey and are able to create a JSON as response but not sure how to get it as a reposne and parse it using register.jsp.