I resolved the issue by changing the getEmplByPostReqParam()
as follows:
@POST
@Path("/get")
public Response getEmplByPostReqParam(@FormParam("param1") String id) {
EmployeeDAO dbHandler = new EmployeeDAOImpl();
System.out.println("getEmplByPostReqParam");
Employee fetchedEmployee = dbHandler.findEmployee(Integer.parseInt(id));
ResponseBuilder rb = new ResponseBuilderImpl();
rb.type(MediaType.APPLICATION_ATOM_XML);
rb.entity(fetchedEmployee);
return rb.build();
}
This is working fine for me, if there is some better approach or there is something wrong with this approach, please post a comment.