Today I am trying to enable manager app of Tomcat 7 on Windows 7. According to tomcat document I need to add <user> to tomcat-users.xml to grant access. I use Emacs, edit tomcat-users.xml, then save, but whatever I set the username/password/roles, I cannot login due to 401 error.
After several hours attempting I suddenly realized that I am editing wrong file! After search and compare several version of this file. I found that this is what I am editing and saving:
C:\Users\Sean\AppData\Local\VirtualStore\Program Files\Apache Software Foundation\Tomcat 7.0\conf\tomcat-users.xml
Instead of the right place:
C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\tomcat-users.xml
What happened even if I open the file in emacs using the right path? This is from Microsoft answers:
To protect against some types of malware, Windows 7 doesn't allow users to store data in C:\Windows , C:\Program Files , or their subfolders.
To allow existing programs that access those locations to run, it automatically (and transparently) translates such access to the VirtualSore folder:
C:\Windows\... --> C:\Users\"Name"\AppData\Local\VirtualStore\Windows\...
C:\Program Files\... --> C:\Users\"Name"\AppData\Local\VirtualStore\Program Files\...
That’s it, restart emacs with administrator fix it.
No comments:
Post a Comment