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

StackOverflow https://stackoverflow.com/questions/12194997

  •  29-06-2021
  •  | 
  •  

Question

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

Was it helpful?

Solution

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top