According to the instructions in some blogs I tried to modify the C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\tomcat-users.xml
file as
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="admin" roles="admin,manager"/>
</tomcat-users>
But Save Failed dialog box is appearing with the text " Please check if this file is opened in another program". But I am sure that none of the programs are started/running related to this file. The modification permission is denied. what is the reason..?
I think the reason is that you can't edit files in "Program Files" without administrator rights.
I had that kind of problem several times and I usually solve it by running my text editor with admin rights.
For example, to edit file with notepad in Windows 7: Find it in your start menu, click on it with right mouse button. You should be able to choose "run as administrator" from the context menu. Now edit the file and you should be able to save it.