I am using Tomcat 7
to deploy my web projects on. Also I am more comfortable when using the Eclipse interface
to start and stop my Tomcat, so I've added it in the Eclipse's Servers
and check the "Use Tomcat Installation" in Server Locations
. One more thing that I use is the Tomcat's web Manager tool
to deploy/undeploy the projects.
As we know in order to use the Manager/html tool you have to sign in. The username and the password to authenticate are set in the tomcat-users.xml like this (in my file):
<role rolename="tomcat"/>
<role rolename="manager"/>
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<role rolename="standard"/>
<role rolename="admin"/>
<user username="tomcat-eclipse" password="tomcat-eclipse" roles="tomcat,manager,manager-script,standard,admin"/>
<user username="root" password="toor" roles="manager-gui" />
Everything works fine until some moment in time (I'm not sure but maybe after several restarts or redeploys) the configuration that I've entered is flushed and the default (empty configuration) file overrides my customized config.
Q: What causes the file to be overridden and how can I prevent that? Thanks.
Edit:
A: What I suggest based on some experiments is:
your-tomcat-install-dir/webapps
into your-eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/
in order to have the nice Tomcat html interface (as shown in Tutorial: Installing Tomcat 7 and Using it with Eclipse). Try it. :)
In Eclipse go to your Project 'Servers' in your 'Project Explorer' panel and inside folder 'Tomcat v7.0 Server at localhost-config'(this is the default name for a Tomcat server maybe yours is slightly different) change there tomcat-users.xml
Project Explorer > 'Server's > Tomcat v7.0 Server at localhost-config > tomcat-users.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With