tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matador <matador1910-li...@yahoo.com>
Subject Re: virtual host doesn't load database content
Date Fri, 07 Oct 2005 03:28:09 GMT
matador <matador1910-lists@yahoo.com> wrote in
news:Xns96E6E48D82B9Amatador@80.91.229.5: 

> ok so i define my connection pools etc in a context.xml for localhost:
> 
> C:\Tomcat 5.5\conf\Catalina\localhost\context.xml
> 
> and it works.
> 
> but when the site is accessed from the virtual host defined in
> server.xml, then the context.xml (deployed as described below) does
> not ever see the connection pools
> 
> i tried it as follows, no joy:
> 
> C:\Tomcat 5.5\conf\Catalina\struts.acme.com\context.xml
> C:\Tomcat 5.5\conf\Catalina\struts.acme.com\context.xml.default
> C:\Tomcat 5.5\conf\Catalina\struts.acme.com\struts.xml
> C:\Tomcat 5.5\conf\Catalina\struts.acme.com\struts.acme.com.xml
> 
> only ever works from server.xml
> 
> is there a workaround?  i know im not the only one:
> http://www.junlu.com/msg/187453.html

got it to work:

here is how:
tomcat 5.5.9
windows

server.xml

    <Engine
        defaultHost="localhost"
        name="Catalina">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
      <Host
          appBase="webapps/acme"
          name="struts.acme.com">
        <Alias>struts.acme.com</Alias>
      </Host>
      <Host
          appBase="webapps"
          name="localhost">
      </Host>
    </Engine>


add this file:
C:\Tomcat 5.5\conf\Catalina\struts.acme.com\ROOT.xml 

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" antiResourceLocking="true" docBase="" 
reloadable="true" workDir="work\Catalina\struts.acme.com\_">

    <ResourceLink global="jdbc/...
    
    <Resource auth="Container" name="jdbc/...

    <WatchedResource>WEB-INF/web.xml....
    
</Context>


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


Mime
View raw message