I'm using REST to POST (from Firefox's Poster) a url:
http://[ip]/page.jsp?paramater1=whatever¶meter2=whatever (Content Type: application/x-www-form-urlencoded)
The page.jsp contains:
<body onload="onload()">
<script>
document.forms["myform"].submit(); // just to be redundant
function onload(){
document.forms["myform"].submit(); // just to be redundant
}
</script>
<form action="SessionTestDriver" method="post" id="myform">
[form stuff]
</form>
But it doesn't seem to be submitting that form. If I manually load the page on a browser, everything works perfectly. It's just the REST call that does nothing.
Clearly I'm missing something. Advice?
SOLVED! Got it! The main jsp page just called a servlet on submit. I tried that servlet directly in the REST url instead of the jsp page and everything worked how I wanted!