• Post Reply Bookmark Topic Watch Topic
  • New Topic

sending http/php requests from Java applet.  RSS feed

 
Ranch Hand
Posts: 686
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings. I had a thread going in the JDBC forum, but we concluded that JDBC wasn't the answer to my prayers, so I packed things up and moved them here.

The ultimate goal is to have data from a java applet on a client populate a mySQL database on a server. My free hosting service has limited functionality. Probably if there is a way it is by using php/html, so I wish to focus on this option. Perl is also available, but no server side java.

from what I can determine from googling things, any solution will probably involve java sending an http request. And two classes that have figured prominently are java.net.URL and java.net.URLConnection. Other than that, things are clear as mud.

A key requirement I need to be able to pass 1-2 kb of text along with a simple URL.

Anyways, I was hoping that someone who has done this sort of thing could provide some insight, and maybe save me a few days worth of deciphering API docs and trial and error coding.

thanks

p.s. if I can get the data into php variables, I am home free, don't need help with that part
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using Apache's HttpClient lib.
I've previously done a small script where I pass requests to an external server and HttpClient does the job well.
 
Fred Hamilton
Ranch Hand
Posts: 686
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Hector, I'll look into it, right now its not my number one priority, but I'll try to post back here with the results when i do get to round to investigating.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!