Li3ro
Li3ro

Reputation: 1877

unable to change tomcat-users.xml and server.xml while tomcat(7) runs **within** eclipse(juno)

I ran into a problem today and I was hoping someone could answer/explain for me. I was trying to add a new role and new user to tomcat-users.xml ,and add a realm to server.xml ,to test some basic authentication in a small web app I am playing with. I made the change in the base tomcat directory then tried logging in with the new role. Nothing seemed to work. I've just discovered that Eclipse created a new tomcat-users.xml and server.xml when I created the server instance so I figured I would just add my new user there(and realm) and everything would be fine; however, when I change those files its not applied to the server. I restarted eclipse and it changed both files to default. i read somewhere about this awful workaround, delete the tomcat-reinstall tomcat in eclipse and it will import the latest tomcat-users.xml into eclipse. my question is: is there a way to change tomcat users from eclipse? if not, is there other solution other than delete the server?

thanx

chk it outenter image description here

Upvotes: 1

Views: 2992

Answers (2)

UltraMaster
UltraMaster

Reputation: 1134

Configuration files, which are copied into tmp deployment directory are located within your eclipse workspace: workspace-name/Servers/TomcatServerName-config/

Upvotes: 1

nitind
nitind

Reputation: 20023

You should be editing the original files in your Servers project instead of the deployed copies directly.

Upvotes: 5

Related Questions