Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Edit <tomcat-install>/conf/context.xml.
    If you are running Tomcat 5.5 you edit <tomcat-install>/conf/server.xml.

     

  2. Within the Context tags, directly after the opening <Context.../> line, insert the DataSource Resource tag:

     

    <Resource name="jdbc/TermWebDS"
                auth="Container"
                type="javax.sql.DataSource"
                username="termwebuser"
                password="termwebpassword"
                driverClassName="com.mysql.jdbc.Driver"
                url="jdbc:mysql://localhost:3306/termweb?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf8"
                maxActive="20"
                maxIdle="10"
                validationQuery="Select 1"/>

     

    • Replace the username and password parameters with the correct values for your database.
    • In the url parameter, replace the word 'termweb' with the name of the database your TermWeb data will be stored in.

...

Info

This step is only necessary if you for some reason need to use another data source name than the default jdbc/TermWebDS. In this case you will have to reapply these changes after every upgrade or reinstall of TermWeb.

  1. Edit <tomcat-install>/webapps/termweb/WEB-INF/web.xml.
  2. Go to the end of the file and locate the following element just before </web-app>:

     

    <resource-ref>
    ...
        <res-ref-name>jdbc/TermWebDS</res-ref-name>
    ...
    </resource-ref>

     

  3. Change jdbc/TermWebDS to your desired JNDI data source name.
  4. Use the same data source name in the file you edited in the previous step

...