Sujoy wrote:
>
> You have to do one more thing ie. conn.setRequestMethod("POST");
>
No, that is incorrect.
You don't have to setRequestMethod("POST"). It's
implied by URLConnection.setDoOutput(true).
Very basic Java questions like this one are perhaps
best answered by a pointer to some (authoritative)
resource like the Java Tutorial at Sun:
<URL:http://java.sun.com/docs/books/tutorial/index.html>
Which has a section on exactly this topic:
<URL:http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html>
The latter URL even has sample code. Generally,
checking over the freely available documentation
before asking a question will get you better
answers, faster.
-cks
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html