Recently I was reading Head First
JSP where it was explained that
servlet Context attribute are not
thread safe.I understood the concept.then it was also explained that how to make it thread safe.In which one solution given was to make service() method synchronized.but writer rejects this option saying that if we make service method synchronized it would stop other thread from same servlet accessing the context attributes,but it will not do anything to stop a thread from completly different servlet..Here friends its ok that it cccan not stop thread from other servlet but why it will not stop thread for same servlet.It mean that thread for same servlet are based on same object thats why they conflict each other.