Posted By

alces on 02/18/13


Tagged

webxml servlet hsqldb


Versions (?)

web.xml for run HSQLDB in Servlet mode


 / Published in: XML
 

URL: hsqldb_servlet_web_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>

  1. <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" >
  2. <web-app>
  3. <servlet>
  4. <servlet-name>hsql</servlet-name>
  5. <servlet-class>org.hsqldb.server.Servlet</servlet-class>
  6. <!-- Example of absolute DB path, for path relative ./WEB_INF add parameter hsqldb.server.use_web-inf_path = true -->
  7. <init-param>
  8. <param-name>hsqldb.server.database</param-name>
  9. <param-value>/var/db/hsql01</param-value>
  10. </init-param>
  11. </servlet>
  12. <servlet-mapping>
  13. <servlet-name>hsql</servlet-name>
  14. <url-pattern>*</url-pattern>
  15. </servlet-mapping>
  16. </web-app>

Report this snippet  

You need to login to post a comment.