Without Book Interview Questions and Answers | Online Test | Moct Test
Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Institute Training Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Servlets Interview Questions and Answers

Ques 16. What is servlet mapping?

Ans. The servlet mapping defines an association between a URL pattern and a servlet. The mapping is used to map requests to servlets.

Is it helpful? Add Comment View Comments
Ques 17. What is servlet context ?
Ans. The servlet context is an object that contains a servlet's view of the Web application within which the servlet is running. Using the context, a servlet can log events, obtain URL references to resources, and set and store attributes that other servlets in the context can use. (answer supplied by Sun's tutorial).
Is it helpful? Add Comment View Comments
Ques 18. Which interface must be implemented by all servlets?
Ans. Servlet interface.
Is it helpful? Add Comment View Comments
Ques 19. Explain the life cycle of Servlet.
Is it helpful? Add Comment View Comments
Ques 20. When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
Ans. An instance of servlet is created when the servlet is loaded for the first time in the container. Init() method is used to configure this servlet instance. This method is called only once in the life time of a servlet, hence it makes sense to write all those configuration details about a servlet which are required for the whole life of a servlet in this method.
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2016 WithoutBook