title: redirect from JSP is in type pending and status canceled
body: <p>I'm having a JSP file that is calling a <code>REST</code> post call which doing a get to a remote server.
  the request is being processed but get pending in the remote machine in status canceled.
  can you please assist?</p>
  
  <p>here is part of the JSP:`</p>
  
  <pre><code>&lt;tr&gt;
                  &lt;td&gt;&lt;button id="registerBtn" onclick="registerClick()"&gt;Register&lt;/button&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;button id="loginBtn" onclick="postOnClick()"&gt;Log in&lt;/button&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
          &lt;script type='text/javascript'&gt;
              function registerClick() {
  
                  /* var params = "{realm: astra, subjectId: " + document.getElementById('usrInpt').value + " , authInfo: omsspass}"; */
                  var first = document.getElementById('firstNameInpt').value;
                  var last = document.getElementById('lastNameInpt').value;
                  var user = document.getElementById('usrInpt').value;
                  var password = document.getElementById('passInpt').value;
                  var email = document.getElementById('emailInpt').value;
  
                  var http = new XMLHttpRequest();
  
                  var url = "http://localhost:8080/authJ/v0/authJ/users?realm=JOES_PIZZA&amp;uid=" + user +"&amp;firstname=" + first + "&amp;lastname=" + last + "&amp;password=" + password + "&amp;email=" + email;
  
                  //var params = "{realm: astra, subjectId: " + document.getElementById('usrInpt').value + " , authInfo: omsspass}";
  
                  http.open("POST", url, true);
                  //http.setRequestHeader("Content-type", "application/json");
                  http.onreadystatechange = function() {
                      if (http.readyState == 4 &amp;&amp; http.status == 200) {
                          document.open();
                          document.write(http.responseText);
                      }
                  };
                  http.send();
              }
          &lt;/script&gt;`
  </code></pre>
  
  <p>here is the java code</p>
  
  <pre><code>:`@POST
      @Path("/users")
      public Response createUser(@QueryParam("uid")String uid, @QueryParam("firstname") String firstName, @QueryParam("lastname") String lastName, @QueryParam("email")String email,
              @QueryParam("password")String password, @QueryParam("realm") String realm) {
          //readProperties();
          String tokenID = getToken();
          StringBuffer openAmUrl = new StringBuffer().append("http://").append(openAmIp).append(openAmWarName).append("/identity/create?");
          openAmUrl.append("identity_name=").append(uid);
          openAmUrl.append("&amp;identity_attribute_names=userpassword");
          openAmUrl.append("&amp;identity_attribute_values_userpassword=").append(password);
          openAmUrl.append("&amp;identity_attribute_names=sn");
          openAmUrl.append("&amp;identity_attribute_values_sn=").append(lastName);
          openAmUrl.append("&amp;identity_attribute_names=cn");
          openAmUrl.append("&amp;identity_attribute_values_cn=").append(firstName);
          openAmUrl.append("&amp;identity_realm=/").append(realm);
          openAmUrl.append("&amp;identity_type=user");
          if (email != null){
              openAmUrl.append("&amp;identity_attribute_names=mail");
              openAmUrl.append("&amp;identity_attribute_values_mail=").append(email);
          }
          openAmUrl.append("&amp;admin=").append(tokenID);
  
          URI uri = null;
          try {
              uri = new URI(openAmUrl.toString());
          } catch (URISyntaxException e) {
              LOGGER.error("Exception " + e);
              e.printStackTrace();
          }
          return Response.seeOther(uri).build();
      }
  `
  </code></pre>
  
  <p>thanks in advance!</p>