Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have recently installed Xampp, and I am now learning JSP but after copying my .jsp file into the required file and starting Tomcat it won't let me access the manager without a user and password.

I have made no changes to any of the settings and this is a brand new install, I have managed to find the default user/password for MySql on the net but have had no such luck for TomCat. I have used the folowing user/passowrd combinations till now:

  • root and no password
  • root as user and password
  • xampp as user and password

Please help me with finding the default user password or better yet how to change them, I've seen some files which look like they might contain the user/passwords but I do not wish to replace things blindly.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

Look at conf/tomcat_users.xml.

Uncomment the roles and users block. Define a role named "admin" (if tomcat6) or "manager-gui" (tomcat7). Then, define a user named as you want with the password you like AND the role admin or manager-gui.

Restart tomcat. Test

share|improve this answer
    
Thank you, this is what I needed to know. –  George Bora Dec 14 '11 at 20:13

Look at conf/tomcat_users.xml.

share|improve this answer
    
Thank you for the help, I've edited the file with Notepad ++ and decomented the roles and have tried the role1,tomcat,both and manager ones. But now while I can enter a password I get : HTTP Status 403 - Access to the requested resource has been denied . –  George Bora Dec 14 '11 at 7:36
    
What tocmat version are we talking about? 5.5 should have the UserDataBase activated by default in conf/server.xml and conf/Catalina/localhost/manager.xml. –  Nils Dec 14 '11 at 20:06
    
The version is Tomcat 7 I've managed to solve my problems with the XML file but I added this in case others have this problem your answer works for Tomcat 7. –  George Bora Dec 17 '11 at 16:23

Just look for C:\xampp\tomcat\conf\tomcat_users.xml then put your user account within <tomcat-users> tag. For example:

<tomcat-users>
  <role rolename="admin"/>
  <role rolename="manager"/>
  <user username="admin" password="letmein" roles="admin,manager"/>
</tomcat-users>

Also, don't forget to restart your Tomcat server!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.