web.xml 1.9 KB
Newer Older
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<!-- 
3
Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html). 
4 5
Initial Developer: H2 Group
-->
6 7 8 9 10
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
   version="2.5"> 

11 12 13 14 15 16 17 18 19 20 21 22
    <display-name>H2 Console Web Application</display-name>
    <description>
          A web application that includes the H2 Console servlet.
    </description>
    
    <servlet>
        <servlet-name>H2Console</servlet-name>
        <servlet-class>org.h2.server.web.WebServlet</servlet-class>
        <init-param>
            <param-name>log</param-name>
              <param-value>true</param-value>
        </init-param>
23
        <load-on-startup>1</load-on-startup>
24
    </servlet>
25

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    <servlet-mapping>
        <servlet-name>H2Console</servlet-name>
          <url-pattern>/console/*</url-pattern>
      </servlet-mapping>
      
    <welcome-file-list>
        <welcome-file>/console.html</welcome-file>
    </welcome-file-list>    
    
    
    <!-- Enable the following section when you want basic authentication -->

    <!--
    
    <security-constraint>
41
        <web-resource-collection>
42 43 44
            <web-resource-name>H2 Console</web-resource-name>
            <url-pattern>/console/*</url-pattern>
        </web-resource-collection>
45
        <auth-constraint>
46 47
            <role-name>admin</role-name>
        </auth-constraint>
48 49
    </security-constraint>

50 51 52 53 54 55 56 57 58 59
    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>H2 Console</realm-name>
      </login-config>
      
    <security-role>
        <role-name>admin</role-name>
    </security-role>    
    
    -->
60 61

</web-app>