Hi All,
I am trying to write a Java standalone app (not an applet) that reads a webpage across the net and then responds to it (with a user and password on the first page).
I have got as far as creating an HttpsURLConnection, connecting to it, reading from it and printing the resulting page source which includes a <SCRIPT> tag. Now I want to send something ( a page? a PUT? Run a javascript that sends stuff? I don't know what ) back to the server.
As far as I can see, when the page is displayed in a browser, the script sends the user and password values from the screen back to the server. I have the user and password values available in the app but don't know what to do with them.
I have spent the morning trying to get direction for the next move ( Eg. I found Rhino and jQuery but they seem server-oriented and overkill ). Maybe I just need a subset???
Can anyone point me in the right direction as to how I buld up and send a response? That is, I know how to getOutputStream() and write to it but I don't know what to write.
Should I be trying to run the javascript script from Java (if so how?) or just doing some kind of 'POST' back to the server (if so what format?)?
Sorry for asking about what has clearly been done a million times before but I am going in Googlic circles at the moment.
All constructive comments gratefully received.
I am trying to write a Java standalone app (not an applet) that reads a webpage across the net and then responds to it (with a user and password on the first page).
I have got as far as creating an HttpsURLConnection, connecting to it, reading from it and printing the resulting page source which includes a <SCRIPT> tag. Now I want to send something ( a page? a PUT? Run a javascript that sends stuff? I don't know what ) back to the server.
As far as I can see, when the page is displayed in a browser, the script sends the user and password values from the screen back to the server. I have the user and password values available in the app but don't know what to do with them.
I have spent the morning trying to get direction for the next move ( Eg. I found Rhino and jQuery but they seem server-oriented and overkill ). Maybe I just need a subset???
Can anyone point me in the right direction as to how I buld up and send a response? That is, I know how to getOutputStream() and write to it but I don't know what to write.
Should I be trying to run the javascript script from Java (if so how?) or just doing some kind of 'POST' back to the server (if so what format?)?
Sorry for asking about what has clearly been done a million times before but I am going in Googlic circles at the moment.
All constructive comments gratefully received.