Life Cycle of Protocol Independent Servlet

    1. The life cycle protocol independent servelet follows 4 different steps: 1-instanciation 2-intialization 3-service 4-destroy
    2. Instanciation: servelet engine first loads the servlet class. then creates the instance. this happens only once per servlet when a new user communicate with the servlet.
    3. Initialization: although servlet object has been created, but it is not capable of handling the request. to make able to handle, servlet engine creates the object of servlet config. the init method takes this argument and initialises the servlet. These steps happen only once, where client communicates with the servlet for the first time. it is once for each client.
    4. services: in this ways the servlet engine creates the objects of "HttpServeletRequest" and "HttpRequestResponse" by passing this 2 objects servlet engine calls public service method. the job of public service method is to call protected service method by passing the same argument.(httpservlet request and httpRequestresponse) the protected servlet method calls doget  and doPost method with request and response object. doGet and doPost method eligible to provide the service by executing the content. after executing these steps servlet will wait for the new request. if end user gives a new request the service step will repeated again. if not sending a new request the servlet engine will be wait for a new request.
    5. Destroy:when end user tries to close the communication then Destroy method will execute and deletes the instance.
نظرات 1 + ارسال نظر
صهبانا دوشنبه 30 مرداد‌ماه سال 1391 ساعت 12:07 ب.ظ http://batamegilas.blogsky.com/

سلام
قطعا نوشته های کاربردی خوبی دارید ...
اما شرمنده ام که از آنها سر در نمی آورم .
نام وبلاگتان را خیلی دوست دارم ...
خاطرات خوبی را برایم زنده می کند ...
باغهای سر سبز دهکده ام پونک و درختهای قد برافراشته توت ... و چادری که زیر سایه آن پهن می کردیم ...
همه بودند ... پدر ...مادر و ...

خواستم تشکری کرده باشم .
سپاس .

برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد