I\'ve created a page which asks user to fill some form fields and when he submits, the form is sent to a Restful method which you can see below:
@POST
@Path(
change your code like this, the addUser() should return a Response Object
public Response addUser(@FormParam("username") String username,
@FormParam("password") String password,
@FormParam("id") String id,
@FormParam("group_name") String groupName,
@FormParam("authority_name") String authorityName,
@FormParam("authority_id") String authorityId
)
{
//Something will be done here
java.net.URI location = new java.net.URI("../index.jsp?msg=A_User_Added");
return Response.temporaryRedirect(location).build()
}