This KB describes how to encrypt the Datasource password in tomcat-users.xml for Apache Tomcat. You can follow these steps to configure Tomcat with password encryption. If you are using an updated tomcat version which is later then 6.0.26 these steps will fix your problem.
Step 1: Edit server.xml
-add the diggest option to Realm line at server.xml which is located under conf directory.
Before:
<Realm className="org.apache.catalina.realm.LockOutRealm">
After:
<Realm className="org.apache.catalina.realm.LockOutRealm" digest="md5">
Step 2:Create encrypted password
You will get <YOUR_PASSWORD>:<ENCRYPTED_PASSWORD>
#cd $CATALINA_HOME
#/appdata/apache-tomcat/bin/digest.sh -a SHA test
test:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
Step 3:Replace the user's password to an encrypted one.
-Replace value of user's "password" attribute in your tomcat-users.xml to <ENCRYPTED_PASSWORD>