Hibernate 3.1 Used with Tomcat 5.5.x
Appendix: Examples Installation and Configuration
=================================================
By Bill Treuman and Igor Dayen

0. Content

(a) BasicWeb-Tomcat.zip
(b) Basicweb-Eclipse.zip
(c) MySQL jdbc driver mysql-connector-java-5.0.4-bin.jar

1. Database Setup

(a) MySQL Server version:	5.0.1-alpha-nt-max
(b) Login: 	username=root
(c) Database: 	sampdb
(d) DDL, tables installation: BasicWeb\WEB-INF\classes\datafile.sql (in BasicWeb-Tomcat.zip)

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\mysql501\bin>mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.1-alpha-nt-max

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database sampdb;
Query OK, 1 row affected (0.07 sec)

mysql> SHOW DATABASES;
+----------+
| Database |
+----------+
| mysql    |
| sampdb   |
| test     |
+----------+
3 rows in set (0.00 sec)


mysql> show tables;
+------------------+------------+
| Tables_in_sampdb | table_type |
+------------------+------------+
| car              | BASE TABLE |
| driver           | BASE TABLE |
+------------------+------------+
2 rows in set (0.00 sec)


mysql> select * from driver;
+-----------+-------+------+
| driver_id | name  | age  |
+-----------+-------+------+
|         1 | Jac   |   45 |
|         2 | Jill  |   42 |
|         3 | James |   19 |
+-----------+-------+------+
3 rows in set (0.00 sec)

mysql> select * from car;
+--------+--------------+----------+------+--------------+
| car_id | manufacturer | model    | year | fk_driver_id |
+--------+--------------+----------+------+--------------+
|      1 | Toyota       | Corolla  | 2003 |            1 |
|      2 | Toyota       | Camry    | 2004 |            2 |
|      3 | Honda        | Civic    | 2002 |            3 |
|      4 | Chevrolet    | Corvette | 2004 |            3 |
+--------+--------------+----------+------+--------------+
4 rows in set (0.00 sec)


mysql> status
--------------
mysql  Ver 14.5 Distrib 5.0.1-alpha, for Win95/Win98 (i32)

Connection id:          3
Current database:
Current user:           root@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.0.1-alpha-nt-max
Protocol version:       10
Connection:             localhost via TCP/IP
Client characterset:    latin1_swedish_ci
Server characterset:    latin1_swedish_ci
TCP port:               3306
Uptime:                 1 hour 46 min 53 sec

Threads: 1  Questions: 23  Slow queries: 0  Opens: 11  Flush tables: 1  Open tab
les: 0  Queries per second avg: 0.004
--------------

mysql> exit
Bye

2. Tomcat Setup

(a) Version: apache-tomcat-5.5.20
(b) Download JDK 1.4 Compatability Package if necessary: 
http://tomcat.apache.org/download-55.cgi#5.5.20
(c) Install MySQL jdbc driver:
mysql-connector-java-5.0.4-bin.jar 
into apache-tomcat-5.5.20\common\lib
(d) Install examples:
Unzip BasicWeb-Tomcat.zip into apache-tomcat-5.5.20\webapps


3. Eclipse Setup

(a) Eclipse Version: 3.1.1
(b) Unzip BasicWeb-Eclipse.zip into your workspace.
Project name: BasicWeb





