Advanced Java Programming (3160707) MCQs

MCQs of Servlet API and Overview

Showing 31 to 40 out of 57 Questions
31.
In the web.xml , session configuration is
<session-config> <session-timeout>0<session-timeout> </session-config> What does this means?
(a) Session is never created
(b) Session is never invalidated
(c) Session timeout is zero
(d) None of these
Answer:

Option (a)

32.
The tasks of authentication, blocking of requests, data compression, Encryption and Decryption are performed by
(a) Servlet Config
(b) Servlet Context
(c) Servlet Filter
(d) Servlet Container
Answer:

Option (c)

33.
Which method is used to redirect response to another resource?
(a) response.sendRedirect()
(b) request.sendRedirect()
(c) request.forward()
(d) response.include()
Answer:

Option (a)

34.
Http is ______
(a) Stateless protocol
(b) Statefull protocol
(c) Transfer protocol
(d) none of these
Answer:

Option (a)

35.
What is not TRUE for hidden form field from the following?
(a) It is widely used in comment form of a website.
(b) It is maintained at server side.
(c) It will not work if cookie is disabled.
(d) It does not support hyperlink submission.
Answer:

Option (c)

36.
What is not TRUE for URL rewriting from the following?
(a) It will work if cookie is disabled.
(b) It will work only with links.
(c) URL header size constraint is the problem
(d) Highly secured
Answer:

Option (d)

37.
What kind of information the cookie don’t have?
(a) size
(b) path
(c) maximum age
(d) version number
Answer:

Option (a)

38.
______ cookies are used on websites that need to know who we are but offer us the ability to “remember me” when you enter username and password.
(a) Session Cookies
(b) Persistent Cookies
(c) Third-party cookies
(d) All of these
Answer:

Option (b)

39.
_____ Cookies are used by advertising agencies who have clients that pay for displaying ads.
(a) Session Cookies
(b) Persistent Cookies
(c) Third-party cookies
(d) All of these
Answer:

Option (c)

40.
How to delete cookie?
(a) cookie.setMaxAge(null)
(b) cookie.setMaxAge(‘0’)
(c) cookie.setMaxAge(-1)
(d) cookie.setMaxAge(0)
Answer:

Option (d)

Showing 31 to 40 out of 57 Questions