Assignment No.5
Assignment No.5
a) A programming language
b) A scripting language
a) Servlet
b) HttpServlet
c) ServletConfig
d) ServletRequest
12. Which HTTP method is used to retrieve data from a server using a servlet?
a) GET
b) POST
c) PUT
d) DELETE
14. Which method in the HttpServlet class is used to handle HTTP GET requests?
a) doGet()
b) doPost()
c) service()
d) init()
15. Which object provides information about the client's request to a servlet?
a) ServletConfig
b) HttpServletRequest
c) HttpServletResponse
d) ServletContext
16. What is the purpose of the web.xml file in a servlet-based web application?
a) ServletConfig
b) HttpServletRequest
c) HttpServletResponse
d) ServletContext
22. Which method is used to include the content of another resource during servlet processing?
a) include()
b) import()
c) use()
d) forward()
23. Which servlet API method is called before a servlet instance is destroyed?
a) init()
b) destroy()
c) service()
d) doGet()