Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"/>
 
Saloon Keeper
Posts: 26082
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
The trailboss has a kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic