2016-04-15 16 views
0

Tomcatマネージャの資格情報がありません。すべてがコメントされています。 http://localhost:8080/manager/htmlを実行すると、ユーザー名とパスワードを尋ねます。私がそれらなしでログインしようとすると、それはまだ動作しません。私はコメントを外すためにファイルを編集することができません。ここで Tomcatマネージャにログインできません

は私もブラケットで開くには、管理者として実行]と表示されていないのtomcat-users.xmlの

<?xml version='1.0' encoding='cp1252'?> 
<!-- 
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> 
<!-- 
NOTE: By default, no user is included in the "manager-gui" role required 
t o 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"/> 
--> 

です。私は何をすべきか?

答えて

0

上記のxmlのuserroleエントリのコメントを解除して、ログインユーザーを有効にする必要があります。

このエントリは、私は、これはあなたがTomcatホームディレクトリにwrite権限を持っている必要があることは言うまでもないと思う <role rolename="manager"/> <user username="admin" password="admin" roles="manager"/>

をgoing-を取得する必要があります。

P.S.サーバーを再起動することを忘れないでください。

+0

私はコメントを外すことを知っています。しかし、私はコメントを外した後に保存することができません – Syed

+0

もしそれが* nix mahinceなら 'sudo'を試してください。例えば。 'sudo vim tomcat-users.xml' –

+0

私は窓を使っています。 SudoはLinuxの味だけに使用されます。 – Syed

関連する問題