Actually, I would disagree, at this point the question isn't what should be
done, it's how can this person make use of the information passed to him.
The answer is either to change to the GET method, or use
HttpUtils.parseQueryString.
(*Chris*)
----- Original Message -----
From: Gabriel Wong <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 15, 1999 1:59 PM
Subject: Re: getParameter for POST
>OK but the question is SHOULD the servlet engine include URL parameters in
a
>POST request in the getParameter method or SHOULD the application be forced
to
>use getQueryString()?
>
>Timothy Gallagher wrote:
>
>> .The HTTP specification mentions that you can POST to a CGI using a URL
>> with QUERY information attached to the end. This is a valid way to
>> request a service, and means that in traditional CGI processing you
>> would have to parse the QUERY string as well as the message CONTENT.
>>
>> A Servlet engine may take this approach of still separating the
>> information.
>>
>> (BTW - I'm using Apache JServ, and it see both during a POST)
>>
>> Tim Gallagher
>>
>> -----Original Message-----
>> From: Gabriel Wong [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, March 15, 1999 9:17 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: getParameter for POST
>>
>> You are saying you are doing a POST and passing parameters in the URL?
>> e.g. POST /servlet/projects?name=joe. If thats the case then your
>> Servlet Engine may not see that parameter. The engine only needs to see
>> the URL parameters in a GET and Form values in a POST...
>>
>> Formanek Gary L wrote:
>> >
>> > I'm using servletrunner, so it should be OK. Basically I'm doing what
>> I
>> > showed below with a post from an html web page with the action equal
>> to
>> > below. Again, I don't get a value for name. It finds nothing and
>> returns
>> > null. All of the other form name/value pairs work fine, but the
>> parameters
>> > in the URL do not come thru.
>> >
>> > Thanks,
>> >
>> > Gary
>> >
>> > > -----Original Message-----
>> > > From: Gabriel Wong [SMTP:[EMAIL PROTECTED]]
>> > > Sent: Monday, March 15, 1999 9:29 AM
>> > > To: A mailing list for discussion about Sun Microsystem's Java
>> Servlet
>> > > API Technology.; Formanek Gary L
>> > > 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
>>
>>
___________________________________________________________________________
>> 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