tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darryl L. Miles" <>
Subject Re: Do URL query strings with semi-colons work with TC ?
Date Mon, 05 Sep 2005 11:43:46 GMT

I'm not trying to encode semi-colon into QS.  I'm trying to use 
semi-colon as a replacement for & or rather &amp; when correctly encoded 
into a HTML document.  On the basis that it makes the documents smaller 
and the code easier to write.  I have been left with the impression they 
are directly substitutable from various references around the internet.  
But your comments imply otherwise.

I'd be happy to lookup "path params" in the same way I do for query 
string params with a call:

value = request.getPathParameter(name);

Can I do this ?

Conceptually what is the difference between "path params" and "query 
string params" ?

I'd need to better understand when QS params should be used and path 
params can be used, with relation to cachability properties of the 
resulting resource, i.e. the external impact of resources using &amp; 
verses ;

The reference you cite (el al) 
maybe you could also cite the section I should look at.  A simple search 
for "param" or "semi" yeilds no related results.  I have spent an hour 
looking into the issue over the weekend and found the specification that 
covers the URI scheme for "http:" from this angle it seems to leave the 
part after the ? to denote the start of a query string vague.  Which 
lead me to a presumption that it was HTTP server dependant on its 
interpretation, since for example the modules changed over from & 
to ; as the standard param delimiter with generated URLs, providing the 
resulting URL talks back to itself (the module) all will be well 
in the world but if it links to a TC server then there would appear to 
be a problem.

Thanks for your response.

Jon Wingfield wrote:

> In a URL the semi-colon indicates the start of path parameters (as 
> opposed to the normal query parameters) as defined in rfc2616 (HTTP1.1 
> spec) et al.
> Thus, you can't tell tomcat to use it as a query string delimiter.
> JSESSIONID is a well known path parameter for Servlet 2.2+ Containers.
> To use a semi-colon within a url you'll need to url encode it as %3B
> To use it in the way you want you'll have to encode and parse the 
> query string yourself.
> HTH,
> Jon
> Darryl L. Miles wrote:
>> I swear I had application code working that was using semi-colons to 
>> delimit query string parameters.  I'm sure I've also seen TC append a 
>> ";JSESSIONID=" at the end of the URL.
>> But my own application code written like:
>> String val = request.getParameters("name");
>> Yeilds: val="value;name2=foobar";
>> Is there an additional option to allow semi-colon usage, instead of 
>> &amp;  ?
>> Running TC 5.5.9
>> Thanks.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> .

Darryl L. Miles

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message