tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikita Tovstoles <nik...@eviltwinstudios.net>
Subject deploying myapp.war as "/" - confused
Date Thu, 18 May 2006 23:58:04 GMT
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 "/". 
I have

$tomcat.base/conf/server.xml,

in myapp.war I have:
/META-INF/context.xml

I know that somewhere I should specify <Context path="" docBase="???">. 
So far plugging this into <Host> in server.xml or in WAR's context.xml 
doesn't work - the app is still only accessible at 
localhost:8080/myapp.  On top of that, my JNDI entry is no longer found 
;- Could someone please point out my conf mistake?

thanks
-nikita

server.xml:

<Server port="8005" shutdown="SHUTDOWN">     
    <GlobalNamingResources>
        <!-- DataSource JNDI -->
        <Resource name="jdbc/myDB" auth="Container" 
type="com.mchange.v2.c3p0.ComboPooledDataSource"
        driverClass="com.mysql.jdbc.Driver"
        factory="org.apache.naming.factory.BeanFactory"       
        user="xxx" password="xxxx" 
jdbcUrl="jdbc:mysql://localhost:3306/mydbName"
        />         
    </GlobalNamingResources>
   
    <Service name="Catalina">       
        <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
        <Connector acceptCount="100"
        connectionTimeout="20000" disableUploadTimeout="true"
        enableLookups="false" maxHttpHeaderSize="8192"
        maxSpareThreads="75" maxThreads="150"
        minSpareThreads="25" port="8080"
        redirectPort="8443"/>       

        <Engine name="Catalina" defaultHost="localhost">
            <Host name="localhost"
                appBase="webapps" autoDeploy="false"
                unpackWARs="true">               
                <Context path="" docBase="myapp" />
            </Host>
        </Engine>   
    </Service>  
</Server>

context.xml in myapp.war's META-INF:

<Context path="">  
    <!-- link to global DataSource declaration -->
    <ResourceLink name="jdbc/myDB"
    global="jdbc/myDB"
    type="com.mchange.v2.c3p0.ComboPooledDataSource"/>
  
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>META-INF/context.xml</WatchedResource>
   
</Context>



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


Mime
View raw message