Professional Documents
Culture Documents
Unit VI
Unit VI
Program: CO5I Course: Advanced Java Programming (22517) Course Co-ordinator: Mrs.Chavan P.P.
Unit VI- Servlets
Question Bank
Sr.
Question Option A Option B Option C Option D
No.
Which method is used to specify before any lines that uses the
2 setPageType() setContextType() setContentType() setResponseType()
PintWriter ?
3 What are the functions of Servlet container? Life cycle management Communication support Multithreading support All of the above
5 Web server is used for loading the init() method of servlet. TRUE FALSE
6 Which packages represent classes for servlet API? javax.servlet javax.servlet.http Both a and b None of these
servlets execute on servers 8servlets create static pages servlets can execute single
8 What is the difference between servlet and applet? while applets execute on while applets create dynamic request while applets execute None of these
browser pages multiple requests
16 The life cycle of a servlet is managed by _ http and https servlet context servlet itself servlet container
17 Which method take a string not a URL ? sendRedirect forward Both none
18 Which method shows the client what server is receiving? doGet doOption doTrace doPost
URL rewriting, using session URL rewriting, using servlet URL rewriting, using session
19 Which of the following are session tracking techniques object, using cookies using object, using response object; object, using response
hidden fields using cookies object, using hidden field
Which cookie it is valid for single session only and it is removed each
22 Persistent cookie Non-persistent cookie All of these None of these
time when the user closes the browser?