[ Team LiB ] Previous Section Next Section



I can't seem to connect to my database. What am I doing wrong?


There are several things that are often the cause for this. Most frequently, the URL used to obtain the connection is incorrect. Every product seems to have a different format. Check the vendor documentation. The second most frequent error occurs because Tomcat cannot create the driver. Make sure that the Database Management System (DBMS) classes (usually packaged in one or more JAR files) are available to Tomcat. Placing them in the common/ lib subdirectory will do this. Make sure that you restart Tomcat if it is running, so that it can use the new classes. Finally, the application may not be able to find your database. In the example from this hour, where we used the embedded version of Cloudscape (meaning that Cloudscape was started as part of our application, and not as a separate application instance), it was important to tell Cloudscape how to find the database. Because each product is different, you should consult the product documentation to find out how to do this.


Why isn't the JSTL version of the example working?


Make sure that the classes necessary to use JSTL are installed in the appropriate places in Tomcat. It may also be that you have a problem accessing the database. See the previous question for help.

    [ Team LiB ] Previous Section Next Section