This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Post Parameter Socket Connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Post Parameter Socket Connection" Watch "Post Parameter Socket Connection" New topic

Post Parameter Socket Connection

James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
I can post to a page with the following code:

However in the page I am posting to (AmIPosting.jsp), I cannot get the value of param1 that the above method should be sending. What am I doing wrong?

[ December 04, 2007: Message edited by: James Ellis ]
James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
I don't know exactly what I was doing wrong...I think it had something to do with using the PrintWriter object, but anyway I got the code working now. The working code is below:

Joe Ess

Joined: Oct 29, 2001
Posts: 8843

Looks like the old "don't println on a socket" bug.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Post Parameter Socket Connection
Similar Threads
Accessing FTP Server using Java
Object not found 404
SSL enabled client code with client authentication