Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
| 2 | <!--
|
| 3 | Licensed to the Apache Software Foundation (ASF) under one or more
|
| 4 | contributor license agreements. See the NOTICE file distributed with
|
| 5 | this work for additional information regarding copyright ownership.
|
| 6 | The ASF licenses this file to You under the Apache License, Version 2.0
|
| 7 | (the "License"); you may not use this file except in compliance with
|
| 8 | the License. You may obtain a copy of the License at
|
| 9 |
|
| 10 | http://www.apache.org/licenses/LICENSE-2.0
|
| 11 |
|
| 12 | Unless required by applicable law or agreed to in writing, software
|
| 13 | distributed under the License is distributed on an "AS IS" BASIS,
|
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 15 | See the License for the specific language governing permissions and
|
| 16 | limitations under the License.
|
| 17 | -->
|
| 18 |
|
| 19 | <web-app xmlns="http://java.sun.com/xml/ns/javaee"
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 20 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| 21 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
| 22 | http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
| 23 | version="3.0"
|
| 24 | metadata-complete="true">
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 25 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 26 | <display-name>Tomcat Host Manager Application</display-name>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 27 | <description>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 28 | A scriptable host management web application for the Tomcat Web Server;
|
| 29 | Manager lets you view, create and remove virtual hosts.
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 30 | </description>
|
| 31 |
|
| 32 | <servlet>
|
| 33 | <servlet-name>HostManager</servlet-name>
|
| 34 | <servlet-class>org.apache.catalina.manager.host.HostManagerServlet</servlet-class>
|
| 35 | <init-param>
|
| 36 | <param-name>debug</param-name>
|
| 37 | <param-value>2</param-value>
|
| 38 | </init-param>
|
| 39 | </servlet>
|
| 40 | <servlet>
|
| 41 | <servlet-name>HTMLHostManager</servlet-name>
|
| 42 | <servlet-class>org.apache.catalina.manager.host.HTMLHostManagerServlet</servlet-class>
|
| 43 | <init-param>
|
| 44 | <param-name>debug</param-name>
|
| 45 | <param-value>2</param-value>
|
| 46 | </init-param>
|
| 47 | </servlet>
|
| 48 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 49 | <filter>
|
| 50 | <filter-name>SetCharacterEncoding</filter-name>
|
| 51 | <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
|
| 52 | <init-param>
|
| 53 | <param-name>encoding</param-name>
|
| 54 | <param-value>UTF-8</param-value>
|
| 55 | </init-param>
|
| 56 | </filter>
|
| 57 |
|
| 58 | <filter-mapping>
|
| 59 | <filter-name>SetCharacterEncoding</filter-name>
|
| 60 | <url-pattern>/*</url-pattern>
|
| 61 | </filter-mapping>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 62 |
|
| 63 | <filter>
|
| 64 | <filter-name>CSRF</filter-name>
|
| 65 | <filter-class>org.apache.catalina.filters.CsrfPreventionFilter</filter-class>
|
| 66 | <init-param>
|
| 67 | <param-name>entryPoints</param-name>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 68 | <param-value>/html,/html/,/html/list,/index.jsp</param-value>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 69 | </init-param>
|
| 70 | </filter>
|
| 71 |
|
| 72 | <filter-mapping>
|
| 73 | <filter-name>CSRF</filter-name>
|
| 74 | <servlet-name>HTMLHostManager</servlet-name>
|
| 75 | </filter-mapping>
|
| 76 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 77 | <!-- Define the Manager Servlet Mapping -->
|
| 78 | <servlet-mapping>
|
| 79 | <servlet-name>HostManager</servlet-name>
|
| 80 | <url-pattern>/text/*</url-pattern>
|
| 81 | </servlet-mapping>
|
| 82 | <servlet-mapping>
|
| 83 | <servlet-name>HTMLHostManager</servlet-name>
|
| 84 | <url-pattern>/html/*</url-pattern>
|
| 85 | </servlet-mapping>
|
| 86 |
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 87 | <!-- Define a Security Constraint on this Application -->
|
| 88 | <security-constraint>
|
| 89 | <web-resource-collection>
|
| 90 | <web-resource-name>HostManager commands</web-resource-name>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 91 | <url-pattern>/text/*</url-pattern>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 92 | </web-resource-collection>
|
| 93 | <auth-constraint>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 94 | <!-- NOTE: This role is not present in the default users file -->
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 95 | <role-name>admin-script</role-name>
|
| 96 | </auth-constraint>
|
| 97 | </security-constraint>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 98 | <security-constraint>
|
| 99 | <web-resource-collection>
|
| 100 | <web-resource-name>HTMLHostManager commands</web-resource-name>
|
| 101 | <url-pattern>/html/*</url-pattern>
|
| 102 | </web-resource-collection>
|
| 103 | <auth-constraint>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 104 | <!-- NOTE: This role is not present in the default users file -->
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 105 | <role-name>admin-gui</role-name>
|
| 106 | </auth-constraint>
|
| 107 | </security-constraint>
|
| 108 |
|
| 109 | <!-- Define the Login Configuration for this Application -->
|
| 110 | <login-config>
|
| 111 | <auth-method>BASIC</auth-method>
|
| 112 | <realm-name>Tomcat Host Manager Application</realm-name>
|
| 113 | </login-config>
|
| 114 |
|
| 115 | <!-- Security roles referenced by this web application -->
|
| 116 | <security-role>
|
| 117 | <description>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 118 | The role that is required to log in to the Host Manager Application HTML
|
| 119 | interface
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 120 | </description>
|
| 121 | <role-name>admin-gui</role-name>
|
| 122 | </security-role>
|
| 123 | <security-role>
|
| 124 | <description>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 125 | The role that is required to log in to the Host Manager Application text
|
| 126 | interface
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 127 | </description>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 128 | <role-name>admin-script</role-name>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 129 | </security-role>
|
| 130 |
|
| 131 | <error-page>
|
| 132 | <error-code>401</error-code>
|
| 133 | <location>/WEB-INF/jsp/401.jsp</location>
|
| 134 | </error-page>
|
| 135 | <error-page>
|
| 136 | <error-code>403</error-code>
|
| 137 | <location>/WEB-INF/jsp/403.jsp</location>
|
| 138 | </error-page>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 139 | <error-page>
|
| 140 | <error-code>404</error-code>
|
| 141 | <location>/WEB-INF/jsp/404.jsp</location>
|
| 142 | </error-page>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 143 |
|
| 144 | </web-app>
|