Added proper handling of resources in case of multiple servlets. Added
IP clause.