>From RFC 2396:
http://www.ietf.org/rfc/rfc2396.txt
3.4. Query Component
The query component is a string of information to be interpreted by
the resource.
query = *uric
Within a query component, the characters ";", "/", "?", ":", "@",
"&", "=", "+", ",", and "$" are reserved.
So it's somewhat defined by HTTP standard (such thing exists) and some
limitation is put on the type of characters that can be used but the
interpretation is left to the target (html page will ignore it, CGI program
needs name/value pairs, other resources might expect something else).
And then CGI requires this query to be name/value pairs separated by &
For GET the query is in 'QUERY_STRING' environment variable. For POST it's in
standard input and you need to get CONTENT_LENGTH environmental variable to knwo
how much to read.
HTH
dave.
Anamitra wrote:
> Hi all
> lot of times we construct a URL of the format
> http://xxx/cgi-bin/test?x=y&a=b or we say http://xxx/servlet/test?x=y&a=b .
> Now this is a HTTP GET request which is handled by the cgi script test or
> the servlet test. My question is whether this query string "x=y&a=b" is an
> HTTP format or a CGI format. Since servlets also use it is an HTTP format ie
> forms a part of the HTTP protocol or is it a GGI format of sending data from
> an webpage which the servlets make use of.
>
> In CGI spec it is written that this type of communication takes place by
> writing the environment variables from which the cgi program accesses the
> data. Does the servlet engine do it in the same way ie read from the env and
> format it in a HTTPRequest???
>
> Any comments to clear this doubt are welcome.
> TIA
> Anamitra
>
> ___________________________________________________________________________
> 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
--
David Mossakowski [EMAIL PROTECTED]
Programmer 212.310.7275
Instinet Corporation
"I don't sit idly by, I'm planning a big surprise"
___________________________________________________________________________
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