wood burning stoves 2.0*
The moose likes Tomcat and the fly likes username and password for tomcat manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "username and password for tomcat manager " Watch "username and password for tomcat manager " New topic
Author

username and password for tomcat manager

PS Toh
Greenhorn

Joined: Sep 20, 2006
Posts: 7
I download the tomcat5.5.20 zip file and unzip it. when I access localhost:8080, the first page appear, however what is the username and password for status and tomcat manager at the admin panel. The default should be admin for username and blank for password, but it cannot be used here.

Anyone know what is the default username and password?

Thanks.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There is no default username/password.
This is intentional and was done this way for security purposes.
You can set them yourself by editing the tomcat/conf/tomcat-users.xml file.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
PS Toh
Greenhorn

Joined: Sep 20, 2006
Posts: 7
Thanks for reply.

I change username and tomcat below to "admin", but I still cannot use it to access tomcat manager.

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


May I know how to modify and set the username and password.

Thanks.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The admin and manager apps are two separate things.
Here's a snapshot of a tomcat-users.xml file that works.


Obviously, you'll want to replace the username and password (in caps).
PS Toh
Greenhorn

Joined: Sep 20, 2006
Posts: 7
Ya, it works, thanks for helping.
Michael Carlson
Ranch Hand

Joined: Sep 11, 2005
Posts: 78
I'm having the same problem, but this did not work for me. I get invaled username or password. I'm using netbeans 5.0 if this makes a difference.
Thank you
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Michael,
Try starting a new thread in the IDEs forum.
If that config file doesn't work in your Tomcat install, then maybe Netbeans has altered it's embedded version of Tomcat.
 
Don't get me started about those stupid light bulbs.
 
subject: username and password for tomcat manager