2017-11-29 15:12 GMT+03:00 Mark Thomas <ma...@apache.org>: > On 29/11/17 09:46, r...@apache.org wrote: >> Author: remm >> Date: Wed Nov 29 09:46:00 2017 >> New Revision: 1816617 >> >> URL: http://svn.apache.org/viewvc?rev=1816617&view=rev >> Log: >> Add a bare bones default-context-path impl (best effort really, it's a bad >> feature). Also fix for some mapping paths, excluded pending some >> clarifications. > > I agree that default-context-path is a bad feature.
Several comments 1. The default-context-path is declared in web-app_4_0.xsd As such, it should be allowed in the main web.xml only and not in web fragments. It would be strange for a library to dictate what path a web application is deployed under. The same for several other options that are declared in web-app_4_0.xsd only: request-character-encoding response-character-encoding deny-uncovered-http-methods 2. I am -1 to all those STRICT_SERVLET_COMPLIANCE conditionals. My reading of section "30. default-context-path Element" on page 202 of 246 of servlet-4_0_FINAL.pdf (in chapter 14.4 Deployment Descriptor Diagram) is that this feature is only usable at deployment time. I think this is only a hit to an application deployer (the person performing a deployment). Is there some other place in the Spec PDF where this feature is documented? The changelog chapter does not mention other places, and I do not see any others with a quick search. As a similar example: "short-name" in a tld file of a Tag Library is a hint for the prefix used for those tags. It is not the actual prefix. Thus I think that we do not need to change our auto-deployment/deploy-on-startup procedure. I think that this feature belongs to the ways how a web application may be deployed programmatically. E.g.: 1) Make "path" parameter optional in "text/deploy" command of Manager web application, http://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html#Deploy_A_New_Application_Archive_(WAR)_Remotely 2) Make "path" parameter optional in DeployTask of Ant. 3. If this feature is controlled by a system property, make a separate property which default depends on STRICT_SERVLET_COMPLIANCE. Do not use STRICT_SERVLET_COMPLIANCE directly. As this is a deployment feature, I think it makes sense as an attribute on Host rather that a system property. (Though as I wrong above, I think we do not need to implement it). Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org