pid-2 is right in that the path shouldn't be used here, if i remove this
Tomcat still deploys myapp.war as "/" as it's using the name of the ROOT.xml
file to infer the actual path.

i misread the tomcat context documentation
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html.

deploying your war file without having to rename it ROOT.war or use Apache
RewriteRules to rewrite "/myapp" to "/" is still preferable in my opinion
though, and the real point of the article.

just don't set the "path"! thanks pid-2


Pid-2 wrote:
> 
> Andrew Eells wrote:
>> If it helps it's also possible to deploy your war file with any name at
>> all
>> and have it deployed as the default context "/" - without the need to
>> name
>> it ROOT.war. 
>> 
>> The trick is to have it located outside the Tomcat directory and have the
>> ROOT.xml context docBase point to it whilst setting path="". Exact
>> details
>> can be found here:
> 
> This is incorrect.  If you have an app located outside of the defined
> webapps dir and are using the docBase attribute then merely naming the
> context XML file "ROOT.xml" is enough.
> 
> You may consider the following: a normally deployed ROOT.war causes a
> ROOT.xml to be created - it is this special name that locates the web
> application at the path "/".
> 
> You may only use path="" when the context is defined in server.xml,
> (when a ROOT.xml would not exist) - a practice which is very strongly
> discouraged anyway.
> 
> p
> 
> 
>> http://www.andrew-eells.com/2009/03/21/tomcat-root-war/ Tomcat ROOT.war
>> deployment 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/root-context-path---war-file-not-unwar%27d-tp21553536p22701361.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to