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.

link|improve this question
feedback

2 Answers

up vote 0 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

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

Look at conf/tomcat_users.xml.

link|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
feedback

Your Answer

 
or
required, but never shown

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