SRL Archive - Java Help and Tutorials

Post/get


Richard

2011-03-31 18:40:37

After much in the way of googling, I've been unable to find a decent way of getting and posting with java. Or at least not one that I fully understood and would easily be able to recreate.

Essentially, I just need a simple way of posting onto a PHP based web page, similar in fact to PostHTTPPageEx that we find with Pascal. And an explanation alongside would be nice, so that creating such a function in future would be possible.

mormonman

2011-03-31 18:51:34

http://robbamforth.wordpress.com/2009/04/27/java-how-to-post-to-a-htmlphp-post-form/

First result

Richard

2011-03-31 19:09:35

From: mormonman
http://robbamforth.wordpress.com/2009/04/27/java-how-to-post-to-a-htmlphp-post-form/

First result


Yeah, I saw that result and had type errors with 2 different URLConnection objects.

mormonman

2011-03-31 19:23:59

http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html

or http://download.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html

Richard

2011-04-01 02:43:25

From: mormonman
http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html

or http://download.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html


Yeah, after some fiddling around, I managed to change all the connection classes to the same time. Not entirely sure why there were 2 different ones with near identical methods…

Thanks

mormonman

2011-04-01 03:22:58

That's java for you…

Kave

2011-04-01 03:46:23

http://watij.com