2 Replies Latest reply on Nov 16, 2011 3:59 PM by 796440

    Thread Safe Servlet

      How to write thread safe programme in servlet.

        • 1. Re: Thread Safe Servlet
          You don't write programs in servlets. Servlets may be components in a web application though.

          What you perhaps want is a good book. I suggest you give http://pdf.coreservlets.com a read, not only because it is free but also because it is very good. Whatever you do, you are not going to learn this by asking questions in a forum.
          • 2. Re: Thread Safe Servlet
            If you're asking how to make your servlet threadsafe, then:

            1) Making sure the Servlet itself has no member variables is one step. That will make that class threadsafe.

            2) Of course, your servlet might still me unsafely using other classes. For that, you make it threadsafe just like you do any other code.