wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Servlets & JSP

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

The life cycle of a servlet is managed by

a)

servlet context

b)

servlet container

c)

the supporting protocol (such as http or https)

d)

All of the above

2.

Which JDBC driver Types are for use over communications networks?

a)

Type 3 only

b)

Type 4 only

c)

Both Type 3 and Type 4

d)

Neither Type 3 nor Type 4

3.

What type of servlets use these methods doGet(), doPost(),doHead, doDelete(), doTrace()?

a)

Generic Servlets

b)

HttpServlets

c)

Servlets

d)

All of the above

4.

Which method is used to send the same request and response objects to another servlet in RequestDispacher ?

a)

forward()

b)

sendRedirect()

c)

Both forward() & sendRedirect()

d)

None of the above

5.

Which of the following statement is not correct about HTTP method ?

a)

A GET request append data to the end of the URL.

b)

A POST request append data to the end of the URL.

c)

HTTP DELETE method request for the Server to delete the resource

d)

HTTP OPTIONS request for communication options available on the request/response chain

6.

Java Server Pages (JSP) is a ------------------------------

a)

client-side programming technology

b)

server-side programming technology

c)

Both

7.

Select the correct statement

a)

Every JSP page is converted into servlet

b)

Every servlet is converted into JSP

c)

No conversion is possible

d)

Both conversions are possible

8.

Which of the following is not a directive?

a)

page

b)

form

c)

taglib

d)

include

9.

Select valid declaration in JSP

a)

<% int data=50; %>

b)

<%!-- int data=50; --%>

c)

<%@ int data=50; %>

d)

<%! int data=50; %>

10.

<%@page attribute= %>

In above statement attribute may be

a)

include

b)

import

c)

session

d)

all the above