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 |
|
| 26 | <display-name>Tomcat Manager Application</display-name>
|
| 27 | <description>
|
| 28 | A scriptable management web application for the Tomcat Web Server;
|
| 29 | Manager lets you view, load/unload/etc particular web applications.
|
| 30 | </description>
|
| 31 |
|
| 32 | <servlet>
|
| 33 | <servlet-name>Manager</servlet-name>
|
| 34 | <servlet-class>org.apache.catalina.manager.ManagerServlet</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>HTMLManager</servlet-name>
|
| 42 | <servlet-class>org.apache.catalina.manager.HTMLManagerServlet</servlet-class>
|
| 43 | <init-param>
|
| 44 | <param-name>debug</param-name>
|
| 45 | <param-value>2</param-value>
|
| 46 | </init-param>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 47 | <!-- Uncomment this to show proxy sessions from the Backup manager or a
|
| 48 | StoreManager in the sessions list for an application
|
| 49 | <init-param>
|
| 50 | <param-name>showProxySessions</param-name>
|
| 51 | <param-value>true</param-value>
|
| 52 | </init-param>
|
| 53 | -->
|
| 54 | <multipart-config>
|
| 55 | <!-- 50MB max -->
|
| 56 | <max-file-size>52428800</max-file-size>
|
| 57 | <max-request-size>52428800</max-request-size>
|
| 58 | <file-size-threshold>0</file-size-threshold>
|
| 59 | </multipart-config>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 60 | </servlet>
|
| 61 | <servlet>
|
| 62 | <servlet-name>Status</servlet-name>
|
| 63 | <servlet-class>org.apache.catalina.manager.StatusManagerServlet</servlet-class>
|
| 64 | <init-param>
|
| 65 | <param-name>debug</param-name>
|
| 66 | <param-value>0</param-value>
|
| 67 | </init-param>
|
| 68 | </servlet>
|
| 69 |
|
| 70 | <servlet>
|
| 71 | <servlet-name>JMXProxy</servlet-name>
|
| 72 | <servlet-class>org.apache.catalina.manager.JMXProxyServlet</servlet-class>
|
| 73 | </servlet>
|
| 74 |
|
| 75 | <!-- Define the Manager Servlet Mapping -->
|
| 76 | <servlet-mapping>
|
| 77 | <servlet-name>Manager</servlet-name>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 78 | <url-pattern>/text/*</url-pattern>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 79 | </servlet-mapping>
|
| 80 | <servlet-mapping>
|
| 81 | <servlet-name>Status</servlet-name>
|
| 82 | <url-pattern>/status/*</url-pattern>
|
| 83 | </servlet-mapping>
|
| 84 | <servlet-mapping>
|
| 85 | <servlet-name>JMXProxy</servlet-name>
|
| 86 | <url-pattern>/jmxproxy/*</url-pattern>
|
| 87 | </servlet-mapping>
|
| 88 | <servlet-mapping>
|
| 89 | <servlet-name>HTMLManager</servlet-name>
|
| 90 | <url-pattern>/html/*</url-pattern>
|
| 91 | </servlet-mapping>
|
| 92 |
|
| 93 | <filter>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 94 | <filter-name>SetCharacterEncoding</filter-name>
|
| 95 | <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
|
| 96 | <init-param>
|
| 97 | <param-name>encoding</param-name>
|
| 98 | <param-value>UTF-8</param-value>
|
| 99 | </init-param>
|
| 100 | </filter>
|
| 101 |
|
| 102 | <filter-mapping>
|
| 103 | <filter-name>SetCharacterEncoding</filter-name>
|
| 104 | <url-pattern>/*</url-pattern>
|
| 105 | </filter-mapping>
|
| 106 |
|
| 107 | <filter>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 108 | <filter-name>CSRF</filter-name>
|
| 109 | <filter-class>org.apache.catalina.filters.CsrfPreventionFilter</filter-class>
|
| 110 | <init-param>
|
| 111 | <param-name>entryPoints</param-name>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 112 | <param-value>/html,/html/,/html/list,/index.jsp</param-value>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 113 | </init-param>
|
| 114 | </filter>
|
| 115 |
|
| 116 | <filter-mapping>
|
| 117 | <filter-name>CSRF</filter-name>
|
| 118 | <servlet-name>HTMLManager</servlet-name>
|
| 119 | </filter-mapping>
|
| 120 |
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 121 | <!-- Define a Security Constraint on this Application -->
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 122 | <!-- NOTE: None of these roles are present in the default users file -->
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 123 | <security-constraint>
|
| 124 | <web-resource-collection>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 125 | <web-resource-name>HTML Manager interface (for humans)</web-resource-name>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 126 | <url-pattern>/html/*</url-pattern>
|
| 127 | </web-resource-collection>
|
| 128 | <auth-constraint>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 129 | <role-name>manager-gui</role-name>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 130 | </auth-constraint>
|
| 131 | </security-constraint>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 132 | <security-constraint>
|
| 133 | <web-resource-collection>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 134 | <web-resource-name>Text Manager interface (for scripts)</web-resource-name>
|
| 135 | <url-pattern>/text/*</url-pattern>
|
| 136 | </web-resource-collection>
|
| 137 | <auth-constraint>
|
| 138 | <role-name>manager-script</role-name>
|
| 139 | </auth-constraint>
|
| 140 | </security-constraint>
|
| 141 | <security-constraint>
|
| 142 | <web-resource-collection>
|
| 143 | <web-resource-name>JMX Proxy interface</web-resource-name>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 144 | <url-pattern>/jmxproxy/*</url-pattern>
|
| 145 | </web-resource-collection>
|
| 146 | <auth-constraint>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 147 | <role-name>manager-jmx</role-name>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 148 | </auth-constraint>
|
| 149 | </security-constraint>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 150 | <security-constraint>
|
| 151 | <web-resource-collection>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 152 | <web-resource-name>Status interface</web-resource-name>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 153 | <url-pattern>/status/*</url-pattern>
|
| 154 | </web-resource-collection>
|
| 155 | <auth-constraint>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 156 | <role-name>manager-gui</role-name>
|
| 157 | <role-name>manager-script</role-name>
|
| 158 | <role-name>manager-jmx</role-name>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 159 | <role-name>manager-status</role-name>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 160 | </auth-constraint>
|
| 161 | </security-constraint>
|
| 162 |
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 163 | <!-- Define the Login Configuration for this Application -->
|
| 164 | <login-config>
|
| 165 | <auth-method>BASIC</auth-method>
|
| 166 | <realm-name>Tomcat Manager Application</realm-name>
|
| 167 | </login-config>
|
| 168 |
|
| 169 | <!-- Security roles referenced by this web application -->
|
| 170 | <security-role>
|
| 171 | <description>
|
| 172 | The role that is required to access the HTML Manager pages
|
| 173 | </description>
|
| 174 | <role-name>manager-gui</role-name>
|
| 175 | </security-role>
|
| 176 | <security-role>
|
| 177 | <description>
|
| 178 | The role that is required to access the text Manager pages
|
| 179 | </description>
|
| 180 | <role-name>manager-script</role-name>
|
| 181 | </security-role>
|
| 182 | <security-role>
|
| 183 | <description>
|
| 184 | The role that is required to access the HTML JMX Proxy
|
| 185 | </description>
|
| 186 | <role-name>manager-jmx</role-name>
|
| 187 | </security-role>
|
| 188 | <security-role>
|
| 189 | <description>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 190 | The role that is required to access to the Manager Status pages
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 191 | </description>
|
| 192 | <role-name>manager-status</role-name>
|
| 193 | </security-role>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 194 |
|
| 195 | <error-page>
|
| 196 | <error-code>401</error-code>
|
| 197 | <location>/WEB-INF/jsp/401.jsp</location>
|
| 198 | </error-page>
|
| 199 | <error-page>
|
| 200 | <error-code>403</error-code>
|
| 201 | <location>/WEB-INF/jsp/403.jsp</location>
|
| 202 | </error-page>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 203 | <error-page>
|
| 204 | <error-code>404</error-code>
|
| 205 | <location>/WEB-INF/jsp/404.jsp</location>
|
| 206 | </error-page>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 207 |
|
| 208 | </web-app>
|