Fixing Concurrency Issues At Servlets

The servlets have access to shared resources, which may lead to bugs
(which is actually really likely to happen in case of frequent
requests). To fix this we use Java Synchronized methods, which serves
as a mutex lock of each shared resource.