## hsqldb v.1.61 Download Servlet Demo

### How to test the Servlet

To test the hsqldb v.1.61 Servlet, you will need a Servlet container or the older Java Servlet Development Kit Version 2.1 from Sun. Here is a step-by-step documentation:

- Download the JSDK 2.1:
  http://java.sun.com/products/servlet/ or Jakarta Tomcat from http://jakarta.apache.org/tomcat/index.html
- Extract all files to (for example) D:\Java, so that you have then a file D:\Java\jdsk2.1\startserver.bat or install TomCat, according to the directions on the Jakata site
- Copy the files hsqldb.jar and servletdemo.html to D:\Java\jsdk2.1\examples\servlets or other directory where sevlets may be run from, changing the references accordingly.
- Copy the file hsqldb.jar additionally to D:\Java\jsdk2.1\examples\WEB-INF\servlets or other directory where servlets may be run from, changing the references accordingly.
- Expand the file here. Change to this directory and type:
  `jar -xf hsqldb.jar`
- Make sure the files D:\Java\jsdk2.1\examples\WEB-INF\servlets\hsqldbServlet.class exists, and additional files in the directory D:\Java\jsdk2.1\examples\WEB-INF\servlets\org\hsqldb
- On Windows, run:
  `D:\Java\jsdk2.1>startserver` or start Tomcat
- Start a web browser and open the address:
  http://localhost:8080/ (or other port used to connect to your servlet container)
- You should get the index page for your servlet container. This was only a test if the small web server is running.
- Now, open the hsqldb v.1.61 Servlet Demo page:
  http://localhost:8080/examples/servlets/servletdemo.html
- You can also test the servlet directly, without using the QueryTool. This will display status information:
  http://localhost:8080/examples/servlet/hsqldbServlet

### How to clean the database

The database will write to the files 'test.*'. If it is closed and started again, it will automatically re-load the data. To get a a clean database, all 'test.*' files must be deleted.