blob: 01716c81ccc5056a8e23ec4bd2e9841397e6869d [file] [log] [blame]
Hongqing Liufd5ee812014-05-10 16:32:51 +08001<?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"
刘洪青6266f992017-05-15 21:21:03 +080020 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 Liufd5ee812014-05-10 16:32:51 +080025
刘洪青6266f992017-05-15 21:21:03 +080026 <display-name>Tomcat Host Manager Application</display-name>
Hongqing Liufd5ee812014-05-10 16:32:51 +080027 <description>
刘洪青6266f992017-05-15 21:21:03 +080028 A scriptable host management web application for the Tomcat Web Server;
29 Manager lets you view, create and remove virtual hosts.
Hongqing Liufd5ee812014-05-10 16:32:51 +080030 </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
刘洪青6266f992017-05-15 21:21:03 +080049 <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 Liufd5ee812014-05-10 16:32:51 +080062
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>
刘洪青6266f992017-05-15 21:21:03 +080068 <param-value>/html,/html/,/html/list,/index.jsp</param-value>
Hongqing Liufd5ee812014-05-10 16:32:51 +080069 </init-param>
70 </filter>
71
72 <filter-mapping>
73 <filter-name>CSRF</filter-name>
74 <servlet-name>HTMLHostManager</servlet-name>
75 </filter-mapping>
76
刘洪青6266f992017-05-15 21:21:03 +080077 <!-- 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 Liufd5ee812014-05-10 16:32:51 +080087 <!-- Define a Security Constraint on this Application -->
88 <security-constraint>
89 <web-resource-collection>
90 <web-resource-name>HostManager commands</web-resource-name>
刘洪青6266f992017-05-15 21:21:03 +080091 <url-pattern>/text/*</url-pattern>
Hongqing Liufd5ee812014-05-10 16:32:51 +080092 </web-resource-collection>
93 <auth-constraint>
刘洪青6266f992017-05-15 21:21:03 +080094 <!-- NOTE: This role is not present in the default users file -->
Hongqing Liufd5ee812014-05-10 16:32:51 +080095 <role-name>admin-script</role-name>
96 </auth-constraint>
97 </security-constraint>
Hongqing Liufd5ee812014-05-10 16:32:51 +080098 <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>
刘洪青6266f992017-05-15 21:21:03 +0800104 <!-- NOTE: This role is not present in the default users file -->
Hongqing Liufd5ee812014-05-10 16:32:51 +0800105 <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>
刘洪青6266f992017-05-15 21:21:03 +0800118 The role that is required to log in to the Host Manager Application HTML
119 interface
Hongqing Liufd5ee812014-05-10 16:32:51 +0800120 </description>
121 <role-name>admin-gui</role-name>
122 </security-role>
123 <security-role>
124 <description>
刘洪青6266f992017-05-15 21:21:03 +0800125 The role that is required to log in to the Host Manager Application text
126 interface
Hongqing Liufd5ee812014-05-10 16:32:51 +0800127 </description>
刘洪青6266f992017-05-15 21:21:03 +0800128 <role-name>admin-script</role-name>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800129 </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>
刘洪青6266f992017-05-15 21:21:03 +0800139 <error-page>
140 <error-code>404</error-code>
141 <location>/WEB-INF/jsp/404.jsp</location>
142 </error-page>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800143
144</web-app>