wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JSP

Total questions: 47

Worksheet time: 24mins

Name
Class
Date
1.

What is a Hidden Comment in JSP?

a)

<%– %>

b)

<%– –%>

2.

Which one of the following is correct for directive in JSP?

a)

<%!directive%>

b)

<%directive%>

c)

<%=directive%>

d)

<%@directive%>

3.

Java code is embedded under which tag in JSP?

a)

Expression

b)

Declaration

c)

Scriptlet

d)

Comment

4.

Which method stores the input data in the request body of the clients HTTP request

a)

POST

b)

GET

c)

form

d)

HTML

5.

Which of these is the Web deployment Descriptor file required for the web applications.

a)

WEB-INF

b)

web.xml

c)

webApps

d)

META-INF

6.

Which driver is efficient and always preferable for using JDBC applications?

a)

Type-4

b)

Type-3

c)

Type-2

d)

Type-1

7.

Which packages contain the JDBC classes?

a)

java.jdbc and javax.jdbc

b)

java.jdbc and java.jdbc.sql

c)

java.sql and javax.sql

d)

java.rdb and javax.rdb

8.

Which type of Statement can execute parameterized queries?

a)

PreparedStatement

b)

ParameterizedStatement

c)

ParameterizedStatement and CallableStatement

d)

All kinds of Statements (i.e. which implement a sub interface of Statement)

9.

Two models of JSP Application Architecture are:


Select ALL that apply.

a)

Servlet-Centric Architecture

b)

HTML-Centric Architecture

c)

JSP-Centric Architecture

d)

JavaScript-Centric Architecture

10.
JSP significa...
a)
Java Server Plus
b)
Java Server Pages
c)
Java Server Platform 
d)
Java Standard Platform
11.

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

12.

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

13.

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

14.

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

a)

Genereic Servlets

b)

HttpServlets

c)

Servlets

d)

All of the above

15.

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

16.

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

17.

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

a)

client-side programming technology

b)

server-side programming technology

c)

Both

18.

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

19.

Which of the following is not a directive?

a)

page

b)

form

c)

taglib

d)

include

20.

Select valid declaration in JSP

a)

<% int data=50; %>

b)

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

c)

<%@ int data=50; %>

d)

<%! int data=50; %>

21.

<%@page attribute= %>

In above statement attribute may be

a)

include

b)

import

c)

session

d)

all the above

22.

Which of the following is not an implicit object in jsp?

a)

exception

b)

date

c)

out

d)

context

23.

Default value of autoFlush attribute is?

a)

8kb

b)

16kb

c)

true

d)

false

24.

Which one is the correct order of phases in JSP life cycle?

a)

Initialization, Cleanup, Compilation, Execution

b)

Initialization, Compilation, Cleanup, Execution

c)

Compilation, Initialization, Execution, Cleanup

d)

Cleanup, Compilation, Initialization, Execution

25.

Select the method to get form data into jsp

a)

getParameter()

b)

request.getparameter()

c)

request.getParameter()

d)

request.getString()

26.

The code inside scriplet will be placed in _____ method of jsp life cycle.

a)

jsp_init()

b)

jsp_service()

c)

_jspService()

d)

httpService()

27.

Which of the following is true about <jsp:forward> action?

a)

The forward action terminates the action of the current page.

b)

The forward action forwards the request to another resource such as a static page, another JSP page, or a Java Servlet.

c)

Both the above

d)

None

28.

Which of the following is not a directive?

a)

Include

b)

useBean

c)

export

d)

page

29.

Which is/are the comments in JSP

a)

<%-- comment --%>

b)

</* comment */>

c)

both the above

d)

none

30.

JSP elements are

a)

Directives

b)

Scripting

c)

Page

d)

Action

e)

Include

31.

MVC Stands for

a)

Mobile View Controller

b)

Model Visibility Control

c)

Model View Controller

d)

None of the above

32.

In JSP how many implicit objects are there

a)

7

b)

8

c)

9

d)

10

33.

JSP is a

a)

Server Technology

b)

Client Technology

c)

Both

d)

Either

34.

Which are the techniques for defining the structure of a specific type of XML documents?

a)

Schema

b)

DTD

c)

Both A & B

d)

None of the above

35.

Javascript is _________ language.

a)

Programming

b)

Scripting

c)

Application

d)

applet

36.

JavaScript is ______ Side Scripting Language.

a)

JSP

b)

Servlet

c)

Server

d)

Browser

37.

JavaScript is designed for following purpose -

a)

To Style HTML Pages

b)

To Perform Server Side Scripting Opertion

c)

To add interactivity to HTML Pages.

d)

To Execute Query Related to DB on Server

38.

JavaScript is designed for following purpose -

a)

To Style HTML Pages

b)

To Perform Server Side Scripting Opertion

c)

To add interactivity to HTML Pages.

d)

To Execute Query Related to DB on Server

39.

JavaScript is can be written -

a)

directly into JS file and included into HTML

b)

directly into HTML pages

c)

directly on the Server Script

d)

None of these

40.

JavaScript is an ________ language.

a)

compiled

b)

interpreted

41.

JavaScript Code is written inside file having extension __________.

a)

.jsc

b)

.jvs

c)

.js

d)

.javascript

42.

JavaScript Code is written inside file having extension __________.

a)

.jsc

b)

.jvs

c)

.js

d)

.javascript

43.

Why JavaScript is called as Lightweight Programming Language ?

a)

because JS can provide programming functionality inside but up to certain extend.

b)

because JS is client side scripting

c)

because JS is available free of cost.

d)

because we can add programming functionality inside JS

44.

Local Browser used for validations on the Web Pages uses __________.

a)

HTML

b)

CSS

c)

js

d)

java

45.

JavaScript Code can be called by using _________.

a)

RMI

b)

Function / Method

c)

Triggering Event

d)

Preprocessor

46.

Is this correct syntax to include JS Code inside HTML Page ?

<script type="text/javascript">

...

</script>

a)

Yes

b)

No

47.

We cannot Place JS Code in the body tag . Say true/false.

a)

True

b)

False.