Hi I just installed Tomcat and and am trying to get it up and running however whenever I try to navigate to manager/html it gives me this error \"The requested resource (/ma
Your website is blank because ROOT directory is missing from your ../webapps
folder. Refer to tomcat documentation for the specific location on where it should be.
You have to check if you have the folder with name manager
inside the folder webapps
in your tomcat.
Rubens-MacBook-Pro:tomcat rfanjul$ ls -la webapps/
total 16
drwxr-xr-x 8 rfanjul staff 272 21 May 12:20 .
drwxr-xr-x 14 rfanjul staff 476 21 May 12:22 ..
-rw-r--r--@ 1 rfanjul staff 6148 21 May 12:20 .DS_Store
drwxr-xr-x 19 rfanjul staff 646 17 Feb 15:13 ROOT
drwxr-xr-x 51 rfanjul staff 1734 17 Feb 15:13 docs
drwxr-xr-x 6 rfanjul staff 204 17 Feb 15:13 examples
drwxr-xr-x 7 rfanjul staff 238 17 Feb 15:13 host-manager
drwxr-xr-x 8 rfanjul staff 272 17 Feb 15:13 manager
After that you will be sure that you have this permmint for you user in the file conf/tomcat-users.xml
:
<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<user username="test" password="test" roles="admin-gui,manager-gui"/>
restart tomcat and stat tomcat again.
sh bin/shutdown.sh
sh bin/startup.sh
I hope that will works fine for you.
I couldn't log in to the manager app, even though my tomcat-users.xml file was set up correctly. The problem was that tomcat was configured to get users from a database. An employee who knew how this all worked left the company so I had to track this all down.
If you have a web application with something like this in the projects web.xml:
<security-role>
<role-name>manager</role-name>
</security-role>
You should be aware that this is using the same system for log ins as tomcat! So where ever your manager role user(s) are defined, that is where you should define your manager-gui role and user. In server.xml I found this:
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/<DBName>?user=<DBUser>&password=<DBPassword>"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
That tells me there is a database storing all the users and roles. This overrides the tomcat-users.xml file. Nothing in that file works unless this Realm is commented out. The solution is to add your tomcat user to the users table and your manager-gui role to the user_roles table:
insert into users (user_name, user_pass) values ('tomcat', '<changeMe>');
insert into user_roles (user_name, role_name) values ('tomcat', 'manager-gui');
You should also have a "manager-gui" rolename in the roles table. Add that if it doesn't exist. Hope this helps someone.
Once try by replacing localhost to your 'computer name' i.e, http://localhost:8080
to http://system09:8080
My problem/solution is very embarrassing but who knows... perhaps it happened to someone else:
My solution: Turn off proxy
For the past two hours I've been wondering why my manager would not load. (the root was cached so it loaded). I had set the browser's proxy to proxy traffic to my house. :/
I've faced this issue today. I am using Centos7, the solution was to install tomcat-admin-webapp package.
yum install tomcat-webapps tomcat-admin-webapps