/ Published in: XML
place hsqldb.jar in <servletDir>/WEB-INF/lib,
make file <servletDir>/WEB-INF/web.xml with following content
& your DB will reachable via URL:
http://<tomcatHost>:<tomcatPort>/<servletDir>
make file <servletDir>/WEB-INF/web.xml with following content
& your DB will reachable via URL:
http://<tomcatHost>:<tomcatPort>/<servletDir>
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" > <web-app> <servlet> <servlet-name>hsql</servlet-name> <servlet-class>org.hsqldb.server.Servlet</servlet-class> <!-- Example of absolute DB path, for path relative ./WEB_INF add parameter hsqldb.server.use_web-inf_path = true --> <init-param> <param-name>hsqldb.server.database</param-name> <param-value>/var/db/hsql01</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>hsql</servlet-name> <url-pattern>*</url-pattern> </servlet-mapping> </web-app>