Advanced Java Programming (3160707) MCQs

MCQs of Servlet API and Overview

Showing 21 to 30 out of 57 Questions
21.
How is the dynamic interception of requests and responses to transform the information done?
(a) servlet container
(b) servlet filter
(c) servlet context
(d) servlet config
Answer:

Option (b)

22.
Find the correct session tracking techniques from the following.
i) Using Cookies
ii) Using servlet object
iii) Using session object
iv) Using hidden fields
v) Using context object
vi) Using URL rewriting
(a) i,ii,iv,v
(b) i,iii,v,vi
(c) i,ii,iv,vi
(d) i,iii,iv,iv
Answer:

Option (d)

23.
Which of the following is stored at client side?
(a) Hidden form fields
(b) URL rewriting
(c) Cookies
(d) Http sessions
Answer:

Option (c)

24.
______ maximum size of cookie.
(a) 4KB
(b) 4MB
(c) 8KB
(d) 16MB
Answer:

Option (a)

25.
How to invalidate a session?
(a) session.timeout()
(b) session.invalidate()
(c) session.disconnect()
(d) session.destroy()
Answer:

Option (b)

26.
Which technique creates unique fields in the HTML which are not shown to the user?
(a) Hidden form fields
(b) URL rewriting
(c) Cookies
(d) Http sessions
Answer:

Option (a)

27.
When the object of servlet context is created?
(a) during initialization
(b) during request time
(c) during deployment
(d) during response time
Answer:

Option (c)

28.
How many servlet context object are there per web application?
(a) only one
(b) more than one
(c) atleast one
(d) one or zero
Answer:

Option (a)

29.
As long as web application is executing, ______object will be available, and it will be destroyed once the application is removed from the server.
(a) ServletContext
(b) ServletConfig
(c) ServletRequest
(d) ServletResponse
Answer:

Option (a)

30.
The _____ interface provides the facility of dispatching the request to another resource.
(a) ServletRequest
(b) HttpSession
(c) Filter
(d) RequestDispatcher
Answer:

Option (d)

Showing 21 to 30 out of 57 Questions