A Java question (6)

1 Name: #!/usr/bin/anonymous : 2007-09-06 21:18 ID:Hf9DoOnS

Can anyone give me some pointers on how to send to a web form in Java? I want to write a program like the xChan Directory Dumper. I know 4chan uses cgi, so is it hard/tricky for a Java application to "communicate" with a cgi app?

2 Name: #!/usr/bin/anonymous : 2007-09-06 22:38 ID:Heaven

3 Name: #!/usr/bin/anonymous : 2007-09-07 00:58 ID:Hf9DoOnS

Danke schön, danke schön. This should be an informative read.

4 Name: dmpk2k!hinhT6kz2E : 2007-09-07 03:07 ID:Heaven

Why send to a web form? In the end it'll be sent as a PUT anyway. Communicating with a CGI program is just plain HTTP.

You should probably be using something like this: http://java.sun.com/j2se/1.5.0/docs/api/java/net/HttpURLConnection.html

5 Name: #!/usr/bin/anonymous : 2007-09-11 14:49 ID:Heaven

>>4 probably means POST.

POST is a bit of a pain if you have to properly encode the form, but it's possible. What's easier is using XML-RPC or some other similar layer on top of HTTP.

6 Name: #!/usr/bin/anonymous : 2007-09-14 21:25 ID:Heaven

> POST is a bit of a pain if you have to properly encode the form,

it's pretty easy in javascript.

This thread has been closed. You cannot post in this thread any longer.