0% found this document useful (0 votes)
16 views2 pages

Ajp MCQ Set 1

Uploaded by

sayalimane216
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Ajp MCQ Set 1

Uploaded by

sayalimane216
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SET 5

Sr
Question Option A Option B Option C Option D Ans
No
How can you obtain the value
request.getAt request.getPa request.getSe request.getAt
of a request parameter in a B
tribute() rameter() ssion() tribute()
1 servlet?
What is the default URL
/servlet-
mapping for a servlet in /servlet/* /servlets/* /app/* A
name/*
2 web.xml?

What is the purpose of the To configure To define To specify To store


web.xml file in a servlet servlet servlet HTML database A
application? mappings classes templates connection
3

Which package provides the


javax.servlet java.servlet javax.server java.server A
classes for servlets?
4
GET, POST,
GET, POST, GET, POST,
Which HTTP methods can a GET and DELETE,
PUT, and and B
servlet handle? POST and
DELETE UPDATE
5 MODIFY

DELETE statement of an SQL executeQuer executeUpda executeDelet


execute() C
is executed by ________. y() te() e()
6
The interface to the database JDBC &
ODBC JDBC APIs B
7 is handled by _____. ODBC
DriverMana DriverMana
DriverMana DriverMana
ger, Driver, ger,
ger, Driver, ger,
What are the major Connection, Connection,
Connection, Statement, A
components of the JDBC? Statement, Statement,
and and
and and
Statement ResultSet
8 ResultSet ResultSet
To
What is the purpose of the To connect To execute
To store precompile
PreparedStatement interface in to the DDL C
query results SQL
JDBC? database commands
9 statements
Which method is used to
createConne openConnect getConnectio establishCon
establish a connection to the C
ction() ion() n() nection()
10 database in JDBC?
Which of the following java.util.date
java.io.date java.sql.date java.util.date C
11 contains both date and time? Time

Which of the following is


Slow Using more Using less Better
advantage of using JDBC D
performance memory memory performance
12 connection pool?
Which method executes an
executeUpda executeQuer
SQL statement that may execute() noExecute() C
te() y()
13 return multiple results?
Which Java class is used for
handling UDP (User DatagramSo DatagramCo UDPConnect
UDPSocket A
Datagram Protocol) cket nnection ion
14 communication?
Dynamic Domain Data Digital
What does DNS stand for? Network Name Network Network B
15 System System Service Security
Which port is commonly used
21 80 443 8080 B
16 for HTTP communication?

Which Java class is used for


DatagramSo InputStream
reading and writing data to a ServerSocket Socket B
cket Reader
network socket?
17
In Java networking, what is To get the IP To create a
To retrieve To set the
the purpose of the address of a new
18 the host's local host's A
InetAddress.getByName() domain InetAddress
hostname IP address
method? name object

Servlets handle multiple


19 TRUE FALSE None All A
requests by using threads?

How many ports of TCP/IP


are reserved for specific 10 1024 2048 512 b
protocols?
20

You might also like