This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.
  • 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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: 67735
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: 27489
195
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.
 
Men call me Jim. Women look past me to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic