Tomcat 7 configure web management login

Source: Internet
Author: User

Environment Description: JDK 1.7 and tomcat 7.0 in win7


When installing Tomcat 7, you entered username and password, but failed to log on to the web management interface. The specific error is as follows:


Focus on the marked ones. You can find the solution.

Conf/tomcat-users.xml configuration under the tomcat installation directory:

1. Configure <role rolename = "Manager-status"/> to log on to the status page only.
:

2. Configure <role rolename = "Manager-Gui"/> to view the HTML interface;

You can see the location of the corresponding permission when configuring other items;


 3. My Configuration:

<role rolename="admin-gui" /><role rolename="admin-script" /><role rolename="manager-gui" /><role rolename="manager-script" /><role rolename="manager-jmx" /><role rolename="manager-status" /><user username="admin" password="123456"       roles="manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui" />


Add Admin and manager permissions.

My configuration file is as follows:

<?xml version='1.0' encoding='utf-8'?><!-- 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. --><tomcat-users><user name="admin" password="123456" roles="admin,manager" /><!-- NOTE: By default, no user is included in the "manager-gui" role required to operate the "/manager/html" web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. --><!-- NOTE: The sample user and role entries below are wrapped in a comment and thus are ignored when reading this file. Do not forget to remove <!.. ..> that surrounds them. --><!-- <role rolename="tomcat"/> <role rolename="role1"/>    <user username="tomcat"  password="tomcat" roles="tomcat"/>    <user username="both" password="tomcat" roles="tomcat,role1"/>    <user username="role1" password="tomcat" roles="role1"/>  --><role rolename="admin-gui" /><role rolename="admin-script" /><role rolename="manager-gui" /><role rolename="manager-script" /><role rolename="manager-jmx" /><role rolename="manager-status" /><user username="admin" password="123456"       roles="manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui" /></tomcat-users>

26-33 rows are newly added

After configuration, you can log on to Tomcat 7 Web management logon.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.