File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes How do you use doPost from client ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "How do you use doPost from client ?" Watch "How do you use doPost from client ?" New topic
Author

How do you use doPost from client ?

Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
In J2ME i can use this:
setRequestMethod(HttpConnection.POST);
But what about J2SE ?
I tried with conn.setDoOutput(true); but it's not doing anything.

Please help, thank you.
Alex


"Quoting yourself is stupid" - Me
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 724

Have a look at HttpURLConnection's API documentation.
There's a method in there somewhere that allows control over the request method.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
Alright, thanks, i found it.

But i still can't access doPost...

Again it's not doing anything.

Any help please ?
 
 
subject: How do you use doPost from client ?
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com