Question 1: Which of the following methods are defined in the Servlet interface?
Question 2: Which of the following objects are passed to a servlet's service() method?
Question 3: By default, how many instances of a servlet are created by a Servlet Container?
B. One per request
C. One per session
D. None of the above
Question 4: Which of the following exceptions are defined by the Servlet API?
Question 5: Which of the following are used by Servlet Containers to maintain session information?
B. hidden form fields
C. HTTPS protocol information
D. URL rewriting
Question 6: Which of the following event listeners are defined by the Servlet API?
Question 7: Which of the following methods are defined by the RequestDispatcher interface?
Question 8: Which of the following is the name of the cookie used by Servlet Containers to maintain session information?
Answer 1: C. The finalize() method is not defined by the Servlet interface.
Answer 2: A, C. ServletRequest and ServletResponse methods are passed to the service() method.
Answer 3: A. By default, only one instance of a servlet is created by a Servlet Container.
Answer 4: A, C. The Servlet API defines ServletException and UnavailableException.
Answer 5: A, C, D. Hidden form fields are not used by Servlet Containers to maintain session information..”
Answer 6: A. Only HttpSessionBindingListener is defined by the Servlet API.
Answer 7: B, D. The RequestDispatcher interface defines the include() and forward() methods.
Answer 8: C. The JSESSIONID cookie is used by Servlet Containers to maintain session information.
Previous Chapter: Quick Recap - Chapters 6 to 19
Next Chapter: Chapter 20 - Introduction to Session Management
© 2013 by www.inheritingjava.blogspot.com. All rights reserved. No part of this blog or its contents may be reproduced or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior written permission of the Author.