07-09-2020 WT Assessment

07-09-2020 WT Assessment

Assessment

Quiz

Computers

University

Easy

Created by

Agnes Joshy

Used 2+ times

FREE Resource

Student preview

quiz-placeholder

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Servlet runs each request in a __________ ?

OS shell

JVM

JRE

Separate thread

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

GenericServlet class is encapsulated inside __________ package

java.lang

java.servlet

javax.servlet

javax.servlet.http

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which class provide implementation for service() method ?

HttpServlet

GenericServlet

Servlet

none of the above

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method is called only once in Servlet life cycle ?

service()

initialize()

init()

destroy()

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If the client has disabled cookie in the browser, which session management mechanism could the web container employ ?

Session Management using Cookies

Session Management using URL rewriting

Either Cookies or URL rewriting

Cookies and URL rewriting must be used together

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given request is an HttpServletRequest, which code snippets will creates a session if one doesn't exist?

equest.getSession(false);

request.getSession();

request.createSession();

request.getNewSession();

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method is used access the cookies that are added to response object?

getCookies()

returnCookies();

getNewCookies();

cookies();

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?