What ever you do do not use a GET. It simply attaches the information on the end
of the URL. The biggest draw back is that there is a limit to the amount of
information you can attach. Therefore, if you attach to much, your servlet is
prone to errors and you may actually loose information.
DanC
Andrew Rickard wrote:
> getParameterValues() is used to get values of indexed
> parameters...parameters that return more than one value. I don't know
> how its defined if you use it to get the value of a parameter that's
> only supposed to return a single value(probably returns an array of
> Strings of length = 1)
>
> Andrew
>
> --
> Art Technology Group
> 101 Huntington Ave 22nd Flr
> Boston MA, 02199
> http://www.atg.com
>
> "Jernigan, Bob" wrote:
> >
> > Isn't "getParameter()" deprecated? I've been using "getParameterValues"
> > for both GET and POST. Works just fine.
> >
> > bob
> > (just found this list today).
> >
> > > -----Original Message-----
> > > From: Chris Pratt [SMTP:[EMAIL PROTECTED]]
> > > Sent: Monday, March 15, 1999 5:22 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: getParameter for POST
> > >
> > > 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
> >
> > ___________________________________________________________________________
> > 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