I got the following scenario:
On my webserver I have a .do file with HTML code like this:
<form name="login" action="someAction" method="post">
//some textboxes
</form>
<input type="submit" value="Submit" />
Now I’m trying to make an application, which connects to the webserver – https – fills out the form and get the HTML from the next site (the site, when you’re logged in).
After that I have to do several JavaScript submits to get the data I want to display it in my desktop application.
I somehow managed to build a connection and get the HTML from the login site, but since I’m new to HttpRequests and stuff like that, I have no idea how to go on.
Help would be appreciated.
Edit: I get the following in my Console:
Sep 24, 2011 2:23:28 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify
WARNING: Obsolete content type encountered: 'text/javascript'.
Sep 24, 2011 2:23:30 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify
WARNING: Obsolete content type encountered: 'text/javascript'.
Wrapped com.gargoylesoftware.htmlunit.ScriptException: Error: ERROR: No matching script interactive for function () {
var result = bootstrapDojo();
result.dojo._dijit = result.dijit;
result.dojo._dojox = result.dojox;
return result.dojo;
}
I suggest you to use htmlunit: