This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
When a client makes a connection for a servlet, an instance of the servlet class is created and the new thread uses it to service the request.
Container does not create new instance of the servlet for each request, there can be multiple threads running the service method of the same servlet instance. and hence the class variables may create issues. Look at the servlet life cycle