From c84aee026b37ff13b38159b34afd362deef63b21 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 23 May 2010 10:41:25 +0000 Subject: [PATCH] Add a 403 page. If the user tries to use the old manager role, they'll get a 403. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@947395 13f79535-47bb-0310-9956-ffa450edef68 --- webapps/manager/403.jsp | 71 +++++++++++++++++++++++++++++++++++++++++ webapps/manager/WEB-INF/web.xml | 4 +++ 2 files changed, 75 insertions(+) create mode 100644 webapps/manager/403.jsp diff --git a/webapps/manager/403.jsp b/webapps/manager/403.jsp new file mode 100644 index 000000000..7c4b5d2a2 --- /dev/null +++ b/webapps/manager/403.jsp @@ -0,0 +1,71 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--%> +<% + response.setHeader("WWW-Authenticate", "Basic realm=\"Tomcat Manager Application\""); +%> + + + + 403 Access Denied + + + +

403 Access Denied

+

+ You are not authorized to view this page. If you have not changed + any configuration files, please examine the file + conf/tomcat-users.xml in your installation. That + file must contain the credentials to let you use this webapp. +

+

+ For example, to add the manager-gui role to a user named + tomcat with a password of s3cret, add the following to the + config file listed above. +

+
+<role rolename="manager-gui"/>
+<user username="tomcat" password="s3cret" roles="manager-gui"/>
+
+

+ Note that for Tomcat 7 onwards, the roles required to use the manager + application were changed from the single manager role to the + following four roles. You will need to assign the role(s) required for + the functionality you wish to access. +

+ +

+ For more information - please see the + Manager App HOW-TO. +

+ + + diff --git a/webapps/manager/WEB-INF/web.xml b/webapps/manager/WEB-INF/web.xml index 89cf40a2c..3ea5f5497 100644 --- a/webapps/manager/WEB-INF/web.xml +++ b/webapps/manager/WEB-INF/web.xml @@ -176,6 +176,10 @@ /401.jsp + 403 + /403.jsp + + 404 /404.jsp -- 2.11.0