Reputation: 311
I am try to build an app with the integration of JPA and Struts. to do it need to access tomcat manager. But when I access URL http://localhost:8080/manager/html
it gives 404 Error to me.
My tomcat-users.xml
<?xml version='1.0' encoding='cp1252'?>
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<!--<user name="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status" />-->
<user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
</tomcat-users>
Thanks in Advance.
Upvotes: 10
Views: 155251
Reputation: 1129
This is all I did and restarted the server.
<tomcat-users>
<role rolename="tomcat"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
</tomcat-users>
Upvotes: 1
Reputation: 2683
Your tomcat-users.xml
looks good.
Make sure you have the manager/
application inside your $CATALINA_BASE/webapps/
You have to install tomcat-admin package: sudo apt-get install tomcat8-admin
(for version 8)
I am using Eclipse. I had to copy the manager/
folder from C:\Program Files\apache-tomcat-8.5.20\webapps
to my Eclipse workspace (~\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\
).
Upvotes: 11
Reputation: 1
For me, it just was that service console restart didn't work after tomcat ran into an error. Only stop/start brought it back.
Upvotes: 0
Reputation: 2290
If you are running tomcat from eclipse (probably problem exists with another IDEs), it could have a different configuration- not based on files .
The solution is to edit tomcat users file, as you wrote, and then start tomcat from command prompt with
{tomcat-directory}/bin/startup
Upvotes: 2
Reputation: 137
Notice that the http code response status you are getting is an HTTP 404. The 404 or Not Found error message is a response code indicating that the client was able to communicate with a given server, but the server could not find what was requested.
If you have got an 403 Forbidden vs 401 Unauthorized HTTP responses then it might make a sense to review your tomcat-users.xml.
Resuming: check the manager resources and files of your server installation, some file/directory might be missing, or the path to the manager resources has been changed.
Upvotes: 3
Reputation: 255
Perhaps manager app does not exist look if you the manager application is on $APACHE_HOME/server/webapps directory. on this directory you must have : docs,examples, host-manager,manager, ROOT.
Upvotes: 2