1

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.

4 Answers 4

8

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.

0
3

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!

0
3

This worked for me. Use the admin-gui and admin-script roles as well

<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="admin"/>
<role rolename="manager"/>
<user username="nick" password="1" roles="admin,manager,admin-gui,admin-script"/>
2

Look at conf/tomcat_users.xml.

3
  • 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 . Dec 14, 2011 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, 2011 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. Dec 17, 2011 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .