T4Tutorials .PK

JAVA SERVLETS MCQs – CHAPTER 5 DAE

1. . Servlet is used to create:

(A) Static web page


(B) Dynamic web pages


(C) Both


(D) None




2. . The web container creates ______ for handling the multiple requests to the Servlet.

(A) Threads


(B) Both


(C) Process


(D) None




3. . Servlet that should always override the service() method to handle the client request:

(A) Generic Servlet


(B) HTTP Servlet


(C) Dynamic Servlet


(D) None




4. . The service() method accepts ______ arguments.

(A) Three


(B) One


(C) Two


(D) None




5. . Once application is created the next step would be ______ which will handle request.

(A) None


(B) To initiate Servlet


(C) To destroy Servlet


(D) To create Servlet




6. . The servlet calls ______ method to process a client's request.

(A) init()


(B) Destroy()


(C) None


(D) service()




7. . The ______ method is the main method to perform the actual task in servlet life cycle.

(A) None


(B) Destroy()


(C) init()


(D) service()




8. . The ______ method is called only once at the end of the life cycle of a servlet.

(A) Close()


(B) Both


(C) destroy()


(D) None




9. . The servlet container loads the servlet before invoking the ______ method.

(A) Destroy()


(B) service()


(C) init()


(D) None




Exit mobile version