previous | index | next

Configuring a DataSource in Tomcat

Suppose your web app is webapp-smit0012, you are using HSQLDB, and your database name is bball. Then add the following a Resource element to the Context element for your web app in <tomcat>/conf/server.xml:
   <Context path="/webapp-smit0012"
            docbase="webapp-smit0012"
            debug="5"
            reloadable="true"
            crossContext="true">  
      <Resource 
          name="jdbc/bball" 
          auth="Container"
          type="javax.sql.DataSource"
          driverClassName="org.hsqldb.jdbcDriver"
          url="jdbc:hsqldb:<full path to bball>" 
          username="sa"
          password="" />   
   </Context>  

previous | index | next