Servlets and JDBC
Servlets can use JDBC provided that the container can find the JDBC driver
and the database.
- For Tomcat and HSQLDB, put hsqldb.jar in shared/lib
- For the database, use the virtual path beginning with a slash "/", then
the location of the database relative to the web app directory
- Use the getRealPath method in the ServletContext class to
convert the virtual path to the absolute ("real") path.
- Why? To make the web application and database portable.