tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Weiss <swe...@aamc.org>
Subject Re: question about contexts
Date Sun, 28 May 2000 23:21:55 GMT
Probably the easiest way is to modify this section in server.xml:

    <!-- Add "home" attribute if you want tomcat to be based on a
different directory
         "home" is used to create work and to read webapps, but not for
libs or CLASSPATH.
         Note that TOMCAT_HOME is where tomcat is installed, while
ContextManager home is the
         base directory for contexts, webapps/ and work/
      -->
    <ContextManager debug="0" workDir="work" >

        <ContextManager home="<my-default-context-path>" />   <---- ADD
THIS LINE

This changes the default context path for Tomcat so that all contexts
you add are mounted there.

Barbara Nelson wrote:
> 
> Is this a bug?  (Bugzilla is down, or I'd check it myself).  Is there a way
> to configure a context whose docBase is not in a subdirectory of where
> Tomcat is running, without using an absolute path?  We'd like to have
> something like
> 
> <Context path="/MyCompany/MyProduct/Web" docBase="../../MyProduct/Web"
> 
> but when we configure Tomcat that way, it loads the .jsps but fails to load
> the .gifs or .html files.
> 
> Thanks,
> Barbara Nelson.
> 
> P.S. We are running Tomcat 3.1 final on Solaris.
> 
> -----Original Message-----
> From: Cristian Bogdan [mailto:cristianbogdan@yahoo.com]
> Sent: Friday, May 05, 2000 9:28 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: question about contexts
> 
> hello
> 
> --- Luis Andrei Cobo <valis@megapathdsl.com> wrote:
> > does the document root for context HAVE to be in
> > webapps?
> 
> this might not be helpful for you (serving html and
> jsp by apache and tomcat respectively) but I have
> noticed the following:
> 
> <Context path="/somepath"
> docBase="somedir/public_html" debug="0"
> reloadable="true" >
> 
> works with no problems, even if "somepath" is "" (i.e.
> the root)
> 
> but
> 
> <Context path="/somepath"
> docBase="../somedir/public_html" debug="0"
> reloadable="true" >
> 
> (i.e. if the files are not under TOMCAT_HOME) the html
> files are "404 not found" for tomcat. JSPs in
> somepath/ work with no problems though.
> 
> furthermore, if "somepath/" is "", tomcat can't serve
> any html whatsoever.
> 
> I think the above are bugs (I'm on win95, jdk 1.1.8).
> 
> btw, should bugs be sent to tomcat-dev or to
> tomcat-user?
> 
> thanks
> 
> cristi
> 
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

-- 
Steve Weiss      Association of American Medical Colleges
(202)828-0428    mailto:sweiss@aamc.org    http://www.aamc.org

Mime
View raw message