You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Konstantin Ryadov <kr...@mail.ru.INVALID> on 2017/09/20 09:47:09 UTC
Tomcat 7/8/9 context path restrictions/validation
Hello!
Could you explain context path (e.g. described on https://tomcat.apache.org/tomcat-7.0-doc/config/context.html ) value set in server.xml limitations?
Does it exist any context path validation (unescaped symbols, whitespaces and so on)?
Is first “/” always required in context path value? What is the difference between value with first “/” and without?
Ps
I found "All of the context paths within a particular Host must be unique." only in documentation.
Re: Tomcat 7/8/9 context path restrictions/validation
Posted by Guang Chao <gu...@gmail.com>.
On Wed, Sep 20, 2017 at 5:47 PM, Konstantin Ryadov <kr...@mail.ru.invalid>
wrote:
>
> Hello!
> Could you explain context path (e.g. described on
> https://tomcat.apache.org/tomcat-7.0-doc/config/context.html ) value set
> in server.xml limitations?
> Does it exist any context path validation (unescaped symbols, whitespaces
> and so on)?
> Is first “/” always required in context path value? What is the difference
> between value with first “/” and without?
>
I have not checked before, but I assume white spaces and special characters
are not ok.
> Ps
> I found "All of the context paths within a particular Host must be
> unique." only in documentation.
>
>
>
--
Guang <http://javadevnotes.com/java-double-to-string-examples/>
Re[2]: Tomcat 7/8/9 context path restrictions/validation
Posted by Konstantin Ryadov <kr...@mail.ru.INVALID>.
>Четверг, 21 сентября 2017, 11:27 +03:00 от Mark Thomas <ma...@apache.org>:
>
>On 20/09/17 10:47, Konstantin Ryadov wrote:
>>
>> Hello!
>> Could you explain context path (e.g. described on https://tomcat.apache.org/tomcat-7.0-doc/config/context.html ) value set in server.xml limitations?
>> Does it exist any context path validation (unescaped symbols, whitespaces and so on)?
>> Is first “/” always required in context path value? What is the difference between value with first “/” and without?
>
>A leading "/" is required unless it is the root context in which case
>the path is "".
>
>"/" and "/ROOT" are both always converted to "".
>
>
>"/" and "#" are reserved since they have special meanings.
>
>Other than that, anything goes. If you use characters that are not
>permitted in a URL then you'll need to use %nn escaping when writing the
>request URL. The OS may also limit the characters that can be used.
>
>Mark
>
Thank you for the answer, Mark.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7/8/9 context path restrictions/validation
Posted by Mark Thomas <ma...@apache.org>.
On 20/09/17 10:47, Konstantin Ryadov wrote:
>
> Hello!
> Could you explain context path (e.g. described on https://tomcat.apache.org/tomcat-7.0-doc/config/context.html ) value set in server.xml limitations?
> Does it exist any context path validation (unescaped symbols, whitespaces and so on)?
> Is first “/” always required in context path value? What is the difference between value with first “/” and without?
A leading "/" is required unless it is the root context in which case
the path is "".
"/" and "/ROOT" are both always converted to "".
"/" and "#" are reserved since they have special meanings.
Other than that, anything goes. If you use characters that are not
permitted in a URL then you'll need to use %nn escaping when writing the
request URL. The OS may also limit the characters that can be used.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org