Font size
S
M
L
XL
WorksheetsQuiz-8_Web_Servlet_Talent Next
Total questions: 9
Worksheet time: 4mins
Name
Class
Date
1.
Which of the following statements are true about the Http response status?
a)
A status of 200 to 299 signifies that the request was successful.
b)
A status of 300 to 399 are informational messages.
c)
A status of 400 to 499 indicates an error in the server
d)
A status of 500 to 599 indicates an error in the client
2.
HttpSession object is instanciated using the getSession method from which class?
a)
HttpServletRequest
b)
HttpServletResponse
c)
SessionContext
d)
SessionConfig
3.
Which of the following methods create a new HttpsSession object if there is no pre exsisting sessions?
a)
getSession()
b)
getSession(true)
c)
getSession(false)
d)
getSession().createNew()
4.
Which HTTP request gets invoked, when the user types the URL?
a)
GET method
b)
POST method
c)
HEAD method
d)
PUT method
5.
Which HTTP request gets invoked when the user types clicks on a link (Anchor element)
a)
GET method
b)
POST method
c)
HEAD method
d)
PUT method
6.
Which of the following method is the method signature of the set attribute in HttpSession class?
a)
setAttribute(String,String);
b)
setAttribute(String,Object);
c)
setAttribute(Object,String);
d)
setAttribute(Object,Object);
7.
Whose role is to create the request and response objects for the web application running on a server?
a)
Web server
b)
Servlet
c)
Container
d)
Client
8.
Which http response codes are generated when there is an error at server?
a)
Codes between 200 and 299
b)
Codes between 300 and 399
c)
Codes between 400 and 499
d)
Codes between 500 and 599
9.
How to set the content type of the rendered Page?
a)
HttpServletRequest.setContentType
b)
HttpServletRequest.setResponseContentType
c)
HttpServletResponse.setContentType
d)
HttpServletResponse.setResponseContentType
Reset
