tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikita Tovstoles <nik...@eviltwinstudios.net>
Subject Re: deploying myapp.war as "/" - confused
Date Fri, 19 May 2006 07:25:36 GMT
  Thanks - that was simpler than I thought. Follow up bonus question: 
what's the new "current directory" of ServletContext? Here's what I mean:

I had the following code in servlet context listener inside myapp.war 
getting properties from a .properties file *outside* the .war:

ServletContext.getResourceAsStream("../myapp.properties");

This used to be my directory structure:

$catalina.base/
                webapps/myapp.war
                webapps/myapp
                webapps/myapp.properties

Now that I'm deploying ROOT.war instead of myapp.war, the above line 
can't find myapp.properties. Here's the current dir structure:

$catalina.base/
                webapps/ROOT.war
                webapps/ROOT
                webapps/myapp.properties

So, when I was deploying myapp.war, ServletContext's "current dir" was 
webapps/myapp. What's the new "current directory" of ServletContext for 
ROOT application?

thanks
-nikita
                     

Mark Thomas wrote:
> Nikita Tovstoles wrote:
>> Hi,
>>
>> I have myapp.war that I'd like to deploy by copying myapp.war to
>> catalina.base/webapps; but I would like to bind the app to context "/".
>
> Rename it to ROOT.war
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Mime
View raw message