title: Forward to (*.jsp) page within a java Class after a SQL Statement
body: <p>I don't have deep experience regarding Java and facing the following (small) issue:</p>
  
  <p>How to execute a forward to page within a java Class after a SQL Statement?
  Using Jersey 1.19</p>
  
  <p>Code in Resource:</p>
  
  <pre><code>@POST
  @Path("/remove")
  public String removeUserId(@FormParam("uid") int uid) throws Exception {
  
      FormData test = new FormData();
      return test.removeUser(uid);
  
  }
  </code></pre>
  
  <p>Code in Sub-Resource:</p>
  
  <pre><code>public String removeUser(@FormParam("uid") int uid) throws Exception {
  
      con = DbConn.apiUserProfileConn().getConnection();
      Statement stRemoveUser = con.createStatement();
      String queryRemoveUser = "DELETE FROM users " + "WHERE id = " + uid;
  
      int rsRemoveUser = stRemoveUser.executeUpdate(queryRemoveUser);
  
      return "user: " + uid + " has been removed";
  
  }
  </code></pre>
  
  <p>when I try:</p>
  
  <pre><code>@POST
  @Path("/remove")
  public Response removeUserId(@Context UriInfo uriInfo, @FormParam("uid") int uid) throws Exception {
  
      URI uri =    uriInfo.getBaseUriBuilder().path("removeUser/index.jsp").build();
      return Response.seeOther(uri).build();
  
  }
  </code></pre>
  
  <p>then the I get to <code>removeUser/index.jsp</code> but the user has not been removed from DB table. This is because the uid is not being passed to removeUser in the Sub-Resource. So how can I passe the uid to remove and in the same time execute a kind of call (forward and/or redirect) to: <code>removeUser/index.jsp</code></p>
  
  <p>Thanks in advance!</p>