Tomcat – How to change default user and password for Tomcat

passwordtomcatusersxampp

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 following 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.

Best Answer

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 assigned to it.

Restart your tomcat. Test.