On 2002.12.04 06:29 "Baldan, Simone" wrote:
I do not know how to pass data to a Servlet (both POST and
GET).
For GET I used to add data in the url of the page, but I've seen that
it does not work with the post method.
What is the correct way to pass data in both methods?
With the POST method, your data is passed as the contents of the HTTP
request. You still build the list as
"?name=value&name=value&name=value", but you then write it to the
OutputStream assocatiated with your HttpURLConnection, with a content
type of "application/x-form-urlencoded". Your URL is just the server,
port and servlet information.
--
Darryl L. Pierce <[EMAIL PROTECTED]>
Visit the Infobahn Offramp - <http://welcome.to/mcpierce>
"What do you care what other people think, Mr. Feynman?"
___________________________________________________________________________
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