On 23/02/2015 18:01, Doug Forrest wrote: > 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.
getContext("/ROOT") is just wrong. I agree it should be possible to obtain the ROOT context but that is not the way to do it. Given the Javadoc for getContext(), "" or "/" should be guaranteed to return the ROOT context. Anything else will depend on what contexts are deployed at what paths. > 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. Yes, the restriction is not in line with the Javadoc for getContext() and needs to be relaxed. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org