On Thu, 15 Mar 2001, Miles Poindexter wrote:

> <fontfamily><param>Helvetica</param>I'm involved with a NISO standards activity 
>called OpenURL.
> 
> 
> Where is there a specification on the query syntax assumed for use by 
> 
> the getParameter method of ServletRequest in the servlet API?
> 

The document you are probably most intersted in for this question
is the HTML 4.01 specification (http://www.w3.org/TR/html4), especially
Section 17.13.4.  Note particularly the requirement to encode ampersands
you use yourself (which would be how the HTML spec would interpret what
you are trying to do with the second ampersand.

> 
> For example, in ServletExec and Tomcat, I observe that query parameters after 
> 
> "&&" are ignored; the draft OpenURL specification uses that as an 
> 
> item delimiter.
> 
> 
> Example:
> 
> 
> <underline>http://my.linkbaton.com/isbn/156592391X?x=y&&for=me</underline>
> 

This query string is malformed, because there is no
"name=value" expression in between the two ampersand characters.

> 
> the "for" parameter is invisible to getParameter in servletExec
> 
> 
> I assume that's a bug, but in the absence of a syntax spec, it's not 
> 
> clear what it's supposed to do.
> 
> 
> another example: is it specified anywhere that for
> 
> <underline>http://my.linkbaton.com/isbn/156592391X?x=y&x=z</underline>
> 
> 
> the result of getParameter("x") should be {"y","z"} rather than  {"z","y" }??
> 

See the servlet spec, which you can download at
 <http://java.sun.com/products/servlet/download.html>.

> 
> if I get an enumeration of Parameter names, is there any information 
> 
> in the order returned?
> 

No ... you have to assume that the parameter names are specified in random
order.

> 
> - miles

Craig McClanahan

Reply via email to