title: Send response from REST to JSP after @POST
body: <p>I have a JSP page (client-side)</p>
  
  <pre><code>&lt;form action="http://localhost:8080/REST-WS/rest/token" method="POST"&gt;
  &lt;label for="email"&gt;Email&lt;/label&gt;
  &lt;input name="email" /&gt;
  &lt;br/&gt;
  &lt;label for="password"&gt;Password&lt;/label&gt;
  &lt;input name="password" /&gt;
  &lt;br/&gt;
  &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>It points to a function in REST Web Service (server-side)</p>
  
  <pre><code>@POST
  @Produces(MediaType.TEXT_HTML)
  @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
  public Code verify(@FormParam("email") String email,
  @FormParam("password") String password,
  @Context HttpServletResponse servletResponse) throws IOException {
      Code code = generateRandomCode(email,password);
      return token;
  }
  </code></pre>
  
  <p>The problem is I want to give response to the client side containing the random-generated code from the server side.</p>
  
  <p>First, it will be redirected to another JSP page and then the client side can receive the random-generated code from server.</p>
  
  <p>How do I do it?</p>