HTTP GET and POST pass parameters differently.  The POST method passes the
parameters as part of the data stream, the GET method passes them as part of
the URL, called the query string.  When the Servlet's service method gets
called, it looks at the method that the page was submitted and collects the
proper parameters for that page.  If you want to parse the query parameters
from a POST, try HttpUtils.parseQueryString.
    (*Chris*)

----- Original Message -----
From: Gabriel Wong <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 15, 1999 7:29 AM
Subject: Re: getParameter for POST


>getParameter should work for both GET and POST.  So there could be a
>problem with your Servlet Engine?
>
>Formanek Gary L wrote:
>>
>> Hi,
>>
>> I was always under the impression you could use something such as
>> req.getParameter("name") to get the parameter values off the URL such as
>> http://127.0.0.1/servlet/projects?name=joe. What I have found is that it
is
>> null. Can't you do this with a post from a web page? It works just fine
for
>> the form values on a web page. I know I can use parseQueryString(), but
this
>> seems messy and I was hoping I could use the first one.
>>
>> Thanks,
>>
>> Gary
>>
>>
___________________________________________________________________________
>> 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
>
>___________________________________________________________________________
>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
>

___________________________________________________________________________
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

Reply via email to