The issues were introduced by r1645015 in 7.x and r1644992 in 8.x. Both issues 
are related to ApplicationContext.getContext(String uri).

Issue 1:

getContext("/ROOT") no longer works. In fact, it doesn't appear to be possible 
to get the ROOT context using this method any more since the literal uri for 
ROOT would be "" and the first functional line in the method rejects any uri 
that doesn't start with "/". This is a serious issue that will break many of my 
customers if they apply a patch containing this code.

Suggested fix:

if (uri.equals("/ROOT")) uri = "";

at line 269.

Issue 2:

getContext now only returns a valid context if its path matches the passed in 
uri exactly. This is a huge problem for multiple reasons.

This is a major change in functionality that should not have been introduced in 
a patch release. This code has accepted a uri that contains path information 
past the context root for many years across many releases. This behavior 
mirrors the behavior of every major servlet container available. There is a 
large amount of existing code out in the wild that relies on this behavior. If 
an intentional decision were made to change this method to require an exact 
match, it would be prudent to make such a change in a major release to give 
users and integrators an opportunity to react to the change.

I don't have a suggested fix for this issue, but I would be happy to come up 
with one if required.

Thank you for your time.

Doug Forrest
Principal Escalations Engineer
OpenText

Since I am brand new to this list, a quick note about me: I work in support at 
a very large software company. My team is responsible for level 3 support and 
defect fixes for a large J2EE enterprise web content management application. 
Our product has supported Tomcat as a servlet container for content delivery 
applications since the early 2000s. Many of our customers use Tomcat for their 
production servlet container and it is the go to choice for our internal repro 
environments.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to