Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat keeps resetting my tomcat-users.xml file

Tags:

eclipse

tomcat

I am new to Java/Tomcat development and I am seeing this issue where my tomcat-users.xml file keeps getting reset. My user keeps getting removed and I'm not sure why. I am launching my application from Eclipse that is being deployed to this Tomcat instance.

C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0

VM Arguments

-Dcatalina.base="C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0" -Dcatalina.home="C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0" -Dwtp.deploy="C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\wtpwebapps" -Djava.endorsed.dirs="C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\endorsed"
like image 290
Mike Flynn Avatar asked Mar 06 '13 18:03

Mike Flynn


2 Answers

I updated the tomcat-users.xml file under Servers in Project Explorer. That seems to be copying it over to the real Tomcat Server.

like image 198
Mike Flynn Avatar answered Oct 10 '22 07:10

Mike Flynn


Please try this :

  • Go to tomcat's conf folder and open the server.xml file, in the file between 'GlobalNamingResources' tags you will get 'Resource' tag , add readonly="true" and thats all you need.
like image 27
Soumyaansh Avatar answered Oct 10 '22 07:10

Soumyaansh