Ivan:
 
If you are using TC5, you can move server.xml info not to web.xml but to context.xml 
in META-INF directory.
I have used it with Netbeans 3.6 where the software creates this dir and the file. So 
context.xml contains:
 
<?xml version="1.0" encoding="UTF-8" ?> 
<Context path="/demos" />
 
Change it properly:
 
<?xml version="1.0" encoding="UTF-8" ?> 
<Context path="/"ablogic>
    <ResourceParams name="jdbc/ablogic">
    <!-- Max pool connections -->
    <parameter><name>maxActive</name><value>5</value></parameter>
    <!-- Max idle connections -->
    <parameter><name>maxIdle</name><value>5</value></parameter>
    <!-- Username -->
    <parameter><name>username</name><value>ivan</value></parameter>
    <!-- Password -->
    <parameter><name>password</name><value>kittiesrcute</value></parameter>
    <!--DB Driver -->
    
<parameter><name>driverClassName</name><value>com.mysql.jdbc.Driver</value></parameter>
    <!--DB URL -->
    
<parameter><name>url</name><value>jdbc:mysql://192.168.0.1:3306/school?autoReconnect=true</value></parameter>
</ResourceParams>
</Context>

Try it,
Happy computing,
 
Lorenzo
 


 
 
 
 
 
 
-----Mensaje original-----
De: Ivan Jouikov [mailto:[EMAIL PROTECTED]
Enviado el: Viernes, 02 de Julio de 2004 02:33 a.m.
Para: 'Tomcat Users List'
Asunto: Problems moving <context> from server.xml to web.xml ...


I want to move <context> element from server.xml to web.xml, so I can add new 
applications without restarting the server.

Everything works fine, my DB and all, until I move this entry:
code: 

  _____  

  <Context path="/ablogic" docBase="C:\Documents and Settings\SysOp\My Documents\AB 
LOGIC\Eclipse Workspace\abLogic\web" debug="9" reloadable="true">
                
               <!-- Database -->
               <Resource name="jdbc/ablogic" auth="Container" 
type="javax.sql.DataSource"/>
               
               <ResourceParams name="jdbc/ablogic">
                       <!-- Max pool connections -->
                       <parameter><name>maxActive</name><value>5</value></parameter>
                       <!-- Max idle connections -->
                       <parameter><name>maxIdle</name><value>5</value></parameter>
                       <!-- Username -->
                       <parameter><name>username</name><value>ivan</value></parameter>
                       <!-- Password -->
                       
<parameter><name>password</name><value>kittiesrcute</value></parameter>
                       <!--DB Driver -->
                       
<parameter><name>driverClassName</name><value>com.mysql.jdbc.Driver</value></parameter>
                       <!--DB URL -->
                       
<parameter><name>url</name><value>jdbc:mysql://192.168.0.1:3306/school?autoReconnect=true</value></parameter>
               </ResourceParams>
 
        </Context> 

  _____  



As soon as I move this thing, and try to use my DB, I get the following error:

Error message: Cannot create JDBC driver of class '' for connect URL 'null'

My mysql connector is both in my /common/lib and my /WEB-INF/lib/, just to keep it 
safe. Also, to my web.xml I added these two entries:
code: 

  _____  

 <ResourceLink name="jdbc/ablogic" global="jdbc/ablogic"/>
        
        <resource-ref>
               <description>DB Connection</description>
               <res-ref-name>jdbc/ablogic</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
        </resource-ref> 

  _____  



I have no idea what the hell is wrong. Theoretically, I am not changing anything by 
simply copying <context> element, yet, it seems to stop working .

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004




_____________________________ 
Lorenzo A. Jimenez Briceno
WebMaster
Banco Internacional de Costa Rica
( (506) 243-1077
1 (506) 243-1075
- [EMAIL PROTECTED]

BICSA ÂUn mundo de servicios financieros a su alcance! 
http://www.bicsa.com
7/2/2004 8:01 AM
Este mensaje puede ser confidencial. Si usted no es la persona a quien se debià 
dirigir por favor notifÃquenos de inmediato y borre el mensaje. BICSA no acepta 
responsabilidad legal por ningÃn daÃo causado por virus, errores u omisiones en el 
contenido de este mensaje. Todo uso o divulgaciÃn no autorizado està prohibido. 
Gracias. 

This message may be confidential. If you are not the intended recipient, please notify 
us immediately and delete this message. BICSA does not accept liability for any damage 
caused by virus, errors, or omissions in the contents of this message. Any 
unauthorized use or disclosure of its contents is prohibited. Thank you. 

Reply via email to