I understand that Tomcat currently doesn't always support specifying the 
context root to be used in a file inside the War.

Extract from: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
When autoDeploy or deployOnStartup operations are performed by a Host, the name 
and context path of the web application are derived from the name(s) of the 
file(s) that define(s) the web application. Consequently, the context path may 
not be defined in a META-INF/context.xml embedded in the application and there 
is a close relationship between the context name, context path, context version 
and the base file name (the name minus any .war or .xml extension) of the file.

Other web server handle this better, like GlassFish and it's very convenient. 
Usability is something we should try to achieve.

Since, in all cases, the War will need to be "read" anyway, how hard or costly 
that can be to lookup a configuration file and read it?

I think we cannot mentions "performance" reasons for current behavior since 
everything else that need to be done will always be x factor way slower. It's 
like optimizing string concatenation become calling a database, that makes me 
laugh in each project I work on.

That issue is the only one that makes the infamous GlassFish looks better so I 
wanted to raise it.



Reply via email to