You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mattias Brändström <br...@ludd.luth.se> on 2002/05/10 02:36:40 UTC

context

Hello!

I am having problems with my Context. Below are snippets from my 
httpd.conf and server.xml files:

-- httpd.conf --
<VirtualHost *>
     ServerName www.matlaget.org
     DocumentRoot /var/www/matlaget
     WebAppDeploy  .  conn  /tom
</VirtualHost>
----------------

-- server.xml --
       <Host className = "org.apache.catalina.connector.warp.WarpHost"
             name="www.matlaget.org"
             debug="0"
             appBase="matapp"
             unpackWARs="true">

           <Context path="tom" docBase="" debug="5" reloadable="true">

             <Resource name="jdbc/MatDB" reloadable="true"
                       auth="Container" type="javax.sql.DataSource"/>
             <ResourceParams name="jdbc/MatDB">
               <parameter>
                 <name>user</name>
                 <value>matuser</value>
               </parameter>

               <parameter>
                 <name>password</name>
                 <value>homeworld</value>
               </parameter>

               <parameter>
                 <name>useUnicode</name>
                 <value>true</value>
               </parameter>

               <parameter>
                 <name>driverClassName</name>
                 <value>org.gjt.mm.mysql.Driver</value>
               </parameter>

               <parameter>
                 <name>driverName</name>
                 <value>jdbc:mysql://localhost/matlaget</value>
               </parameter>
             </ResourceParams>

           </Context>

       </Host>
----------------

The thing is that even though I have set reloadable to true in the 
Context the classes doesn't get reread after I have compiled new ones. 
Another thing that isn't working is the database. The DataSource object 
is null after I have looked it up with JNDI.

One of my jsp's is at the URL http://www.matlaget.org/tom/viewdinner.jsp

The jsp runs but the DataSource object that I will use is null. It is 
almost as if I haven't defined a conext at all.

Can anyone see if I have missed some thing in my configuration? Any help 
will be gratly appriciated!

I am running Tomcat 4.0.3 on Linux.

Regards,
Mattias


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>