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: 836

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 ?
 
Threads others viewed
How to setPreferredSize of JPanel
JDBC -con.string from xml
Abstract Factory or Factory Method
How to add image in the footer of PDF
any suggestions of good free text editor
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture