• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to access Tomcat Manager Application(http://localhost:8080/manager

 
ujjwal wahi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Installed Tomcat 7.0.16 on Ubuntu
But I am not being able to access http://localhost:8080/manager. I have already configured the tomcat-users.xml as follows:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager-gui"/>
<user username="manager" password="manager" roles="manager-gui"/>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager-script/>
<user username="script" password="script" roles="manager-script/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>

It is not accespting any of the username and password above.
Please Help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't see anything wrong by inspection, but I haven't tried to use Tomcat7 yet, so I don't know if there are 7-specific nuances.
 
Ashish Agre
Ranch Hand
Posts: 73
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this... i'm using Tomcat 7.0.11
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user password="xyz" roles="manager-script,admin,manager-gui,admin-gui" username="xyz"/>
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Ujjwal!

tomcat-users.xml is only half of what you need. You also need to have the Realm that uses that file enabled. You can do this on a per-server basis in TOMCAT_HOME/server.conf or on a per-application basis in the application's Context xm definition.

The original Realm that used tomcat-users.xml was the MemoryRealm, but there's now a newer Realm that can also use it, too. I'd have to RTFM to remember what its name is, though.
 
naseem mohammed
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Welcome to the JavaRanch, Ujjwal!

tomcat-users.xml is only half of what you need. You also need to have the Realm that uses that file enabled. You can do this on a per-server basis in TOMCAT_HOME/server.conf or on a per-application basis in the application's Context xm definition.

The original Realm that used tomcat-users.xml was the MemoryRealm, but there's now a newer Realm that can also use it, too. I'd have to RTFM to remember what its name is, though.


Thanks Tim. That worked for me.

added this in server.xml

<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"

factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />

in <GlobalNamingResources> of server.xml.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic