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

  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'?>
    <role rolename="manager"/>
    <user username="HVDZWET" password="FOOBAR" roles="manager"/>

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

  5. DONE!

HSQLDB 'install'

  1. Download

  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/ -database.0 file:wk2010 -dbname.0 wk2010 (UNIX) or hsqldb/demo/runServer.bat (WINDOWS)

  5. Working HSQLDB Server with database wk2010