File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Apache tomcat manger role Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache tomcat manger role" Watch "Apache tomcat manger role" New topic

Apache tomcat manger role

rugby fan

Joined: Nov 24, 2008
Posts: 2
hey guys,

need some help sorting out this manager role. When i go to the localhost page the it tells me that everytihg is fine and tomcat was successfully setup.

When i click the link n the left for Tomcat manager i get asked for a username and password. I don't know how to set this up.

In my tomcat-users.xml i have the following:

<?xml version='1.0' encoding='utf-8'?>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="" roles="admin,manager"/>

but none of the usernames/passwords work.

In service.xml a section of the code says the following:

<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
<Resource name="UserDatabase" auth="Container"
description="User database that can be updated and saved"
pathname="conf/tomcat-users.xml" />

so it seems to be looking in the right place.

Has anyone any ideas what i need to do to get access?

Thanks for any help
Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
As per your tomcat-users.xml, for tomcat manager and admin the userid is admin and no password. Try this and see if it works else edit the last line of the file as below

<user username="admin" password="admin" roles="admin,manager"/>

restart the tomcat and try with admin/admin. It should work.

Hope this helps you.

Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2851

"rugby fan " please see your private messages for an important administrative matter.

|Asking Good Questions|
I agree. Here's the link:
subject: Apache tomcat manger role
It's not a secret anymore!