You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Miller, Andy" <An...@hp.com> on 2002/06/07 20:56:49 UTC

ROOT.war / server.xml context / tomcat 4.0.3 problem.. help!

I've got a ROOT.war file that I build for my app, when i deploy it to
<tomcat>/webapps with the default server.xml config file, it extracts
upon tomcat startup.  The problem is i need to configure some logging &
connection pool info that my app uses in my server.xml.  When i modify
the server.xml file as shown below to configure the the default webapp
it only works if ROOT.war is already extracted.  If I remove the ROOT
directory, tomcat barfs on startup saying that it couldn't find
/WEB-INF/web.xml (because it hasn't extracted the ROOT.war file yet).
Is it possible to move all my configuration into web.xml or is there
some other file that tomcat can read in the .war file to get this
info??? Or is there someone to tell tomcat that this info is in a .war
file and it needs to be extracted first??? I just don't know how to
configure the connection pool info if not in the server.xml file, and if
I put it there, it just doesn't get around to extracting the ROOT.war
file before it tries to access the files.  Does this make any sense???
 
<!-- FROM <TOMCAT>\conf\server.xml -->
 
 <Context path="" docBase="ROOT" debug="1" reloadable="true">
     <Logger className="org.apache.catalina.logger.FileLogger"
       directory="e:\java\spitfire\logs"
             prefix="tomcat_output." 
               pattern="combined"/>
               
     <Resource name="jdbc/midgard_dev" auth="Container"
type="javax.sql.DataSource"/>
     <ResourceParams name="jdbc/midgard_dev">
      <parameter>
       <name>user</name>
       <value>castor</value>
      </parameter>
      <parameter>
       <name>password</name>
       <value>XXXXXXXX</value>
      </parameter>
      <parameter>
       <name>driverClassName</name>
       <value>com.inet.tds.TdsDriver</value>
      </parameter>
      <parameter>
       <name>driverName</name>
 
<value>jdbc:inetdae7:spitfiredev.XXXXX.com:1433?database=midgardDb</valu
e>
      </parameter>
      <parameter>
       <name>maxActive</name>
       <value>30</value>
      </parameter>
      <parameter>
       <name>maxIdle</name>
       <value>2</value>
      </parameter>
      <parameter>
       <name>validationQuery</name>
       <value>Select * from tbl_states where id=1</value>
      </parameter>
     </ResourceParams>
</Context>
 
Thanks,
 
Andy Miller
andy.miller@hp.com