Saturday, 10 April 2010

Tomcat6 + hsqldb deployment made easy

For quick and dirty development setup for an Servlet and embedded database the following steps could be used:


Tomcat 'install'



  1. Download http://apache.mirrors.webazilla.nl/tomcat/tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.zip

  2. Unpack zip file

  3. Alter apache-tomcat-6.0.26/conf/tomcat-users.xml to include your favorite username/password (mine HVDZWET/FOOBAR)

    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
    <role rolename="manager"/>
    <user username="HVDZWET" password="FOOBAR" roles="manager"/>
    </tomcat-users>


  4. Start your tomcat appliance using:
    apache-tomcat-6.0.26/bin/startup.sh (UNIX) or
    apache-tomcat-6.0.26/bin/startup.bat (WINDOWS)

  5. DONE!




HSQLDB 'install'



  1. Download http://sourceforge.net/projects/hsqldb/files/hsqldb/hsqldb_1_8_1/hsqldb_1_8_1_2.zip

  2. Unpack zip file

  3. Alter hsqldb/demo/runServer.bat (WINDOWS):

    cd ..\data
    REM @java -classpath ../lib/hsqldb.jar org.hsqldb.Server %1 %2 %3 %4
    %5 %6 %7 %8 %9
    @java -classpath ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:wk2010 -dbname.0 wk2010


  4. Start server


    hsqldb/demo/runServer.sh -database.0 file:wk2010 -dbname.0 wk2010 (UNIX) or hsqldb/demo/runServer.bat (WINDOWS)

  5. Working HSQLDB Server with database wk2010