File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Java Website post Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Java Website post" Watch "Java Website post" New topic

Java Website post

John Hass

Joined: Oct 31, 2004
Posts: 2
I need to be able to read a website get a variable called sessionid then post it back to the site with my search term. Does anyone have any examples for this?

Bhushan Damle

Joined: Nov 28, 2004
Posts: 21
elaborate what u want to do?
Alex Wolf

Joined: Aug 24, 2004
Posts: 16
ok i think i know what you want.
basically you want to read a website with a httpurlconnection, then you're searching for the variable from the what you read, and then you need to make a POST to the site, for like a form or so.

I'd suggest you read through the documentation of URLConnection and HttpURLConnection.

this is just the posting part. im too lazy to experiment for you, so you'll have to do the first part yourself. I hope this helps you somewhat. Just read the documentation, and collect examples.
good luck
I agree. Here's the link:
subject: Java Website post
jQuery in Action, 3rd edition