0
<FORM NAME="form1" METHOD="POST" action="some.jsp">
        <INPUT TYPE="text" NAME="first" VALUE="First">
        <INPUT TYPE="text" NAME="second" VALUE="Second">

    </FORM>

When the form is submitted in the background a POST method is sent to that jsp page with the parameters.

What I am trying to do is that I have an ajax call to a local mediator jsp page which should then take those parameters and post to a page on another domain (this is for me to circumvent the cross-domain problem with ajax calls in IE8).

How would I do an explicit post? Something that takes a URL and the parameters?

oneiros
  • 3,160
  • 10
  • 38
  • 62

1 Answers1

1

If all you are having issue with is posting the form, it is as simple as

document.forms['form1'].submit()

EDIT: In that case, see Using java.net.URLConnection to fire and handle HTTP requests for how to make a POST or GET request. I would recommend using request.getParameterMap() and iterating over that, dropping those parameters into the new outbound request.

http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/connector/Request.html

Community
  • 1
  • 1
josh.trow
  • 4,651
  • 19
  • 30