• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

 
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
 
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • 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"/>
 
Bartender
Posts: 20845
125
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
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
Boost this thread!