Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

www.aktutor.

in
WEB TECHNOLOGY 2020-21

Note: Option in Bold is the Correct Option


1. Unit-I

1. What is a web browser? a. HTTP runs over TCP


a. A program that can display a web b. HTTP allows information to be stored
page in a URL
b. A program used to view html c. Both
documents d. None
c. Both 6. --------- is making the Web standards?
d. None a. Mozilla
2. Which of the following statements are true: b. Microsoft
a. A webapp is a software that lets you c. The World Wide Web Consortium
access websites d. ALL
b. A webapp is defined as a software that 7. _________ is a directory for storing
can be downloaded from the web information about web services.
c. A webapp is a tool which helps us a. HTTP
build websites b. SOAP
d. A webapp is a software we can use c. UDDI
in a web browser d. CGI
3. Which of the following statements is NOT 8. Applets are written in _______
a definition of a web server: programming language.
a. A network component that helps route a. Java
requests from clients to servers b. C++
b. A software for users to browse the c. C
internet d. C#
c. A computer with access to the web
d. All of above 9. The "home page" of a web site is …………….
4. Telnet is a ______ based computer a. the largest page
protocol. b. the last page
a. Text c. the first page
b. Image d. the most colorful page
c. Animation
d. Sound 10. HTTP defines two ways in which values
5. Which of the following statements are true? entered by a user at the browser can be sent
3 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

to the Web server. The _____ method a. A URL represents the server a client
encodes the values as part of the URL. wants to make a request to
a. Post b. A URL helps identify the resource a
b. Get client wants to make a request to
c. Read c. URLs help find the fastest route on the
d. Argument network
11. Documents converted to …………… can d. None of the above
be published to the Web. 16. Dynamic web page:
a. .doc file a. Is same every time whenever it
b. http displays
c. machine language b. Generates on demand by a program
d. HTML or a request from browser
12. When sender and receiver of an e-mail are c. Both
on same system, we need only two d. None
a. User Agents 17. Which factor does NOT influence the
b. Servers performance of a webapp?
c. IP a. The browser used to open the webapp
d. Domain by your users
13. A web cookie is a small piece of data. b. The quality of the network between
a. Sent from a website and stored in client and server
user’s web browser while a user is c. The hardware configuration of the
browsing a website server
b. Sent from user and stored in the server d. The browser that you used while
while a user is browsing a website testing and deploying your webapp
c. Sent from root server to all servers 18. Common gateway interface is used to?
d. All a. Generate web pages
b. Generate executable files from web
14. URL stands for? content by web server
a. Unique reference label c. Stream videos
b. Uniform reference label d. All
c. Uniform resource locator
d. Unique resource locator 19. Computer which stores the different web
15. Which of the following statements are pages is called as:
correct? a. Service Provider
b. Web Browser

4 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. Web Crawler
d. Web Server 25. The following enables access to computing
resources remotely
20. A __________ is the simplest form of a a. FTP
website, in which the site’s content is b. VPN
delivered without the use of server-side c. Blog
processing. d. Twitter
a. E-Commerce Website
b. Dynamic Websites 26. The following allows an Internet host
c. Social Networking Websites Computer to become a terminal of another
d. Static website host on the Internet
21. Which protocol helps to transfer files a. TELNET
between computers? b. Google Groups
a. FTP c. Microsoft OneDrive
b. HTTP d. None of the above
c. UDP
d. FTTP 27. To which protocol(s) are all hosts on the
ARPANET were switched over from the
22. The values GET, POST, HEAD, etc are older ARPANET protocols
specified in ____ of HTTP message. a. UNIX
a. Request line b. TCP/IP
b. Header line c. SSL
c. Entity body d. SIP
d. Status line
23. DNS is an Internet service that translates 28. Who is the Inventor of the Internet?
domain names to or from: a. Vincent Cerf
a. MAC address b. Bob Kahn
b. IP address c. Both (a) and (b)
c. Both d. None of the above
d. None 29. The following is a collection of
24. FTP stands for interconnected documents and other
a. Food Transfer Program resources
b. File Transfer Protocol a. Web
c. File Transfer Programming b. E-mail
d. Facebook To Python c. Chat

5 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

d. Any website from a computer or a program to another


30. Who invented WWW? computer or a program
a. Tim Berners-Lee a. Internet Protocol
b. Thomas Alva Edison b. HTTP
c. Albert Einstein c. TCP
d. Isaac Newton d. UDP
36. The following identifies one of the
31. The following technology lets us to make networks that is part of Internet
voice calls using Internet a. Device ID
a. VoIP b. Net ID
b. FTP c. Both Device ID and Net ID
c. TELNET d. Socke
d. TCP
32. The Client Computer is also called 37. The following identifies the location of
a. Front End source and the destination on Internet
b. Back End a. Internet Protocol
c. Operating System b. HTTP
c. TCP
33. In Client Server model, the following d. UDP
initiates the request 38. The following is a valid IP address
a. Server a. 192.168.1.97
b. Client b. 300.4000.0.1
c. Network on which both are present c. 192.168.1.970
d. Both Client and Server d. 1.2.3.4123
e. 39. The following translates a website address
34. The following is a Web Server software such as http://www.phdtalks.org into a
a. Microsoft Internet Information computer
Server a. understandable IP address
b. Windows 7 operating system b. iTranslate Google Translator
c. Java Beans c. Microsoft SQL Server
d. C# d. Domain Name System
40. An IPv4 address is a
35. The following protocol primarily provides a. 16 bit address
the reliable delivery of stream of bytes b. 32 bit address
c. 128 bit address

6 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

d. 256 bit address c. Web conferencing


d. Mobile conferencing

41. CIDR stands for 47. The following is like a large notice board
a. Classless Internet Domain Routing a. Newsgroup
b. Classless Inter Domain Routing b. E-mail
c. Classless Inter Domain Router c. Chat
d. Classless Internet Domain Router d. Browsing
48. The following is a page or collection of
42. SMTP stands for web pages designed to create and edit
a. Simple Merge Transfer Protocol contents
b. Simple Manual Transfer Protocol a. Forum
c. Simple Mail Transfer Protocol b. Bulletin Board
d. Separate Mail Transfer Protocol c. Chat
43. The following folder normally stores all d. Wiki
unsolicited e-mails 49. The following is the name of the process of
a. Inbox moving a file from a remote location to
b. Spam another location, sometimes, to your
c. Starred Computer Hard Disk
d. Trash a. Uploading
44. The following software supports instant b. Downloading
messaging service c. Deleting
a. Messenger d. Creating
b. E-mail
c. Only Google 50. The following lists are also called glossary
d. Only Yahoo lists
45. SMS stands for a. Unordered lists
a. Sample Messaging Service b. Ordered lists
b. Simple Messaging Service c. Definition lists
c. Stationary Messaging Service d. Linked lists
d. Small Messaging Service 51. The following tag is supported by
Microsoft Internet Explorer but not by
46. Chat is formally known as Netscape Navigator
a. Asynchronous conferencing a. <marquee>
b. Synchronous conferencing b. <br>

7 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. <!–>
d. <p> 56. In java control statements break, continue,
return, try-catch-finally and assert belongs
52. The following is a tool for Web Page to?
Design a. Selection statements
a. Microsoft Expression Web b. Loop Statements
b. Microsoft Word c. Transfer statements
c. Google Sheets d. Pause Statement
d. Adobe Reader

53. TCP/IP stands for 57. Which provides runtime environment for
a. Transfer Control Protocol/Intranet java byte code to be executed?
Protocol a. JDK
b. Transfer Control Protocol/Internet b. JVM
Protocol c. JRE
c. Transmission Control d. JAVAC
Protocol/Internet Protocol
d. Transmission Control 58. What is byte code in Java?
Protocol/Intranet Protocol a. Code generated by a Java compiler
54. The following software allows authoring of b. Code generated by a Java Virtual
programs in identical environments on Machine
either the PC or the Macintosh and produce c. Name of Java source code file
runtimes for either d. Block of code written inside a class
a. Authorware 3
b. Fortran 59. Which of the following are not Java
c. DBase keywords ?
d. Pascal a. double
b. switch
55. Who is known as father of Java c. then
Programming Language? d. instanceof
a. James Gosling 60. Which of these have highest precedence?
b. M. P Java a. ()
c. Charel Babbage b. ++
d. Blais Pascal c. *
d. >>

8 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

b. Memory used by the object with no


61. Which of these is returned by operator '&' ? reference is automatically
a. Integer reclaimed.
b. Character c. The JVM cleans output of Java
c. Boolean program with error.
d. Float d. Any unused package in a program
automatically gets deleted.
62. Data type long literals are appended by
_____ 66. Which one is a template for creating
a. Uppercase L different objects ?
b. Lowercase L a. An Array
c. Long b. A class
d. Both A and B c. Interface
d. Method
63. Which variables are created when an object
is created with the use of the keyword 'new' 67. Which symbol is used to contain the values
and destroyed when the object is of automatically initialized arrays?
destroyed? a. Brackets
a. Local variables b. Braces
b. Instance variables c. Parentheses
c. Class Variables d. Comma
d. Static variables
64. Java language was initially called as 68. Which one is true about a constructor ?
________ a. A constructor must have the same
a. Sumatra name as the class it is declared within.
b. J++ b. A constructor is used to create objects.
c. Oak c. A constructor may be declared private
d. Pine d. All of the above

65. What is garbage collection in the context of 69. Which of these operators is used to allocate
Java? memory to array variable in Java?
a. Java deletes all unused java files on a. alloc
the system. b. malloc
c. new malloc
d. new

9 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. go()
70. Which of these is not a bitwise operator? d. stop()
a. &' Operator
b. &=' Operator 75. What is the full form of JVM ?
c. |=' Operator a. Java Very Large Machine
d. <=' Operator b. Java Verified Machine
c. Java Very Small Machine
71. Which of these is returned by Greater Than, d. Java Virtual Machine
Less Than and Equal To (i.e Relational)
operator ? 76. In Java code, the line that begins with /*
a. Fload and ends with */ is known as?
b. Integer a. Multiline comment
c. Boolean b. Single line comment
d. Double c. Both A & B
d. None of these
72. Which statement transfer execution to 77. Which of the following are not Java
different parts of your code based on the modifiers?
value of an expression? a. Public
a. If b. private
b. Switch c. friendly
c. Nested-if d. transient
d. if-else-if
78. Output of the program
73. What feature of OOP has a super-class sub-
class concept?
a. Hierarchical inheritance
b. Single inheritance
c. Multiple inheritances
a. Compiler Error: Operator >> cannot
d. Multilevel inheritance
be applied to negative numbers
b. 2 2
c. 02
74. Which of the following are not the methods
d. -2 2
of the Thread class?
a. yield() 79. Output of the program

b. sleep(long msec)

10 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

b. Stack
c. Disk
d. File

83. Find the correct option of following


statement about "final" keyword(in JAVA)
a. "final" keyword with variable: to
make variable constant
a. Compiler Error
b. "final" keyword with method: to
b. 30
avoid overriding of that method
c. 10
c. "final" keyword with class: to
d. -10
avoid inheritance of that class
80. Output of the following TWO statements d. All of Above
(placed inside main method):
System.out.println(10 + 20 +
84. Find the correct option of following
"CSE-A");
statement about "abstract" keyword(in
System.out.println("& CSE-B" +
JAVA)
10 + 20);
a. "abstract" keyword can be used
with method and class
a. 1020CSE-A & CSE-B30
b. Object cannot be created of an
b. 30CSE-A & CSE-B30
"abstract" class
c. 30CSE-A & CSE-B1020
c. Both
d. 1020CSE-A & CSE-B1020
d. None
81. What allows the programmer to destroy an
object x (in JAVA)?
85. Which Java-Exception is invalid (not
a. x.finalize()
defined)?
b. x.delete()
a. ArithmeticDivideException
c. Only the garbage collection
b. IndexOutOfBoundsException
system can destroy an object
c. IOException
d. Runtime.getRuntime().gc()
d. AWTException
86. Which keyword does not belongs to Java-
82. Where an "object" of a class(in JAVA) get Exception?
stored? a. catch
a. Heap b. finally

11 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. try
d. None of these
90. Which of these packages contain all the
Java’s built in exceptions?
87. Find the correct statement about Java- a. java.lang
Exception b. java.util
c. java.io
d. java.net

a. Statement-I & Statement-II are true


91. Thread priority in Java is?
& Statement-III is false
a. Integer
b. All are true
b. Float
c. All are false
c. double
d. None(choice not provided)
d. long

88. Which function of pre-defined class


92. In java multi-threading, a thread can be
"Thread" is used to check weather current
created by
thread is still running?
a. Extending Thread class
a. isAlive()
b. Implementing Runnable interface
b. join()
c. Using both
c. isRunning()
d. None
d. alive()

93. Which method must be implemented by a


89. What is multithreaded programming?
Java thread?
a. It’s a process in which two or more
a. run()
parts of same process run
b. execute()
simultaneously.
c. start()
b. It’s a process in which two different
d. None
processes run simultaneously.
c. Its a process in which many different
process are able to access same 94. What is maximum thread priority in Java?
information. a. 10
d. Its a process in which a single b. 5
process can access information from c. 12
many sources. d. 8

12 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

95. " It causes the currently executing thread a. A class can extends only one
object to pause and allow other threads to another class
execute temporarily". The above statement b. A class can extends multiple
belongs to which JAVA-Thread -Method classes.
activity c. A class can extends multiple
a. yield() interfaces.
b. join() d. An interface can extends multiple
c. suspend() interfaces
d. notify()
100. In java, “this” keyword is used to
a. Pass as an argument to a method.
96. What concepts come under Polymorphism b. Refer current class object.
in java? c. Return current class object.
a. Method overloading d. All are correct
b. Constructor overloading
c. Method overriding
101. Garbage collection in Java is:
d. All the above
a. Unused package in a program
97. Which is runtime polymorphism in Java automatically gets deleted.
oops? b. Memory occupied by objects with
a. Method overriding no reference is automatically
b. Method overloading reclaimed for deletion.
c. Constructor overloading c. Java deletes all unused java files on
d. All the above the system.
d. The JVM cleans output of Java
98. "super" keyword in java is used to
program.
a. Refer immediate parent class
instance variables.
b. Invoke immediate parent class 102. Correct syntax to create Java
methods. package(named as "myPackage")
c. Invoke immediate parent class a. import myPackage;
constructor. b. create package myPackage;
d. All the above c. new package myPackage;
d. package myPackage;

99. True statements about extending a


class/interface in java are 103. Output of following JAVA program

13 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

107. In Graphics class which method is


used to draws a rectangle with the specified
width and height?
a. public void drawRect(int x, int y, int
width, int height)
a. 2 b. public abstract void fillRect(int x, int
b. compilation error at y, int width, int height)
"System.out.println(b)" c. public abstract void drawLine(int x1,
c. compilation error at "byte a=1" int y1, int x2, int y2)
d. compilation error at "byte b=a+1" d. public abstract void drawOval(int x,
int y, int width, int height)
104. Which is the container that doesn't
contain title bar and MenuBars but it can
108. Name the class used to represent a
have other components like button,
GUI application window, which is
textfield etc?
optionally resizable and can have a title bar,
a. Window
an icon, and menus.
b. Frame
a. Window
c. Panel
b. Panel
d. Container
c. Dialog
d. Frame
105. The Swing Component classes that are
109. To use the ActionListener interface it
used in Encapsulates a mutually exclusive
must be implemented by a class there are
set of buttons?
several ways to do that find in the
a. AbstractButton
following?
b. ButtonGroup
a. Creating a new class
c. JButton
b. Using the class the graphical
d. ImageIcon
component
106. Which package provides many event
c. An anonymous inner class
classes and Listener interfaces for event
d. All mentioned above
handling?
a. java.awt
110. hich is a component in AWT that can
b. java.awt.Graphics
contain another component like buttons,
c. java.awt.event
text fields, labels etc.?
d. None of the above
a. Window
b. Container

14 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. Panel a. java.awt
d. Frame b. java.Graphics
111. Which is used to store data and partial c. java.awt.Graphics
results, as well as to perform dynamic d. None of the above
linking, return values for methods, and 116. How many ways can we align the
dispatch exceptions? label in a container?
a. Window a. 1
b. Panel b. 2
c. Frame c. 3
d. Container d. 4

112. What are the different types of 117. What will be the output of the
controls in AWT? following Java program?
a. Labels
b. Pushbuttons class main_class
c. Checkboxes {
d. Choice lists public static void main(String args[])
e. All of these {
int x = 9;
113. Give the abbreviation of AWT? if (x == 9)
a. Applet Windowing Toolkit {
b. Abstract Windowing Toolkit int x = 8;
c. Absolute Windowing Toolkit System.out.println(x);
d. None of the above }
}
114. The following specifies the advantages }
of It is lightweight. It supports pluggable a. 9
look and feel. It follows MVC (Model b. 8
View Controller) architecture. c. Compilation error
a. Swing d. Runtime error
b. AWT
c. Both A & B 118. What will be the output of the
d. None of the above following Java program?
115. Which class provides many methods
for graphics programming? class box

15 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

{ d. constructor
int width; 121. Which method can be defined only
int height; once in a program?
int length; a. main method
} b. finalize method
class mainclass c. static method
{ d. private method
public static void main(String args[]) 122. Which of this statement is incorrect?
{ a. All object of a class are allotted
box obj = new box(); memory for the all the variables
obj.width = 10; defined in the class
obj.height = 2; b. If a function is defined public it can be
obj.length = 10; accessed by object of other class by
int y = obj.width * obj.height * inheritation
obj.length; c. main() method must be made public
System.out.print(y); d. All object of a class are allotted
} memory for the methods defined in
} the class
a. 12
b. 200 123. What will be the output of the
c. 400 following Java program?
d. 100
class equality
119. What is the process of defining more {
than one method in a class differentiated by int x;
method signature? int y;
a. Function overriding boolean isequal()
b. Function overloading {
c. Function doubling return(x == y);
d. None of the mentioned }
120. Which of the following is a method }
having same name as that of it’s class? class Output
a. finalize {
b. delete public static void main(String args[])
c. class {

16 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

equality obj = new equality(); 127. What will be the output of the
obj.x = 5; following Java code?
obj.y = 5; class box
System.out.println(obj.isequal()); {
} int width;
} int height;
a. false int length;
b. true int volume;
c. 0 void finalize()
d. 1 {
volume = width*height*length;
System.out.println(volume);
124. Which of the following is a method }
having same name as that of its class? protected void volume()
a. finalize {
b. delete volume = width*height*length;
c. class System.out.println(volume);
d. constructor }
125. Which operator is used by Java run }
time implementations to free the memory class Output
of an object when it is no longer needed? {
a. delete public static void main(String args[])
b. free {
c. new box obj = new box();
d. none of the mentioned obj.width=5;
obj.height=5;
126. Which function is used to perform obj.length=6;
some action when the object is to be obj.volume();
destroyed? }
a. finalize() }
b. delete() a. 150
c. main() b. 200
d. none of the mentioned c. Run time error
d. Compilation error

17 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

128. What will be the output of the a. final


following Java code? b. last
class area c. constant
{ d. static
int width;
int length;
131. What will be the output of the
int area;
following Java program?
void area(int width, int length)
class Output
{
{
this.width = width;
public static void main(String args[])
this.length = length;
{
}
int a1[] = new int[10];
}
int a2[] = {1, 2, 3, 4, 5};
class Output
System.out.println(a1.length + " " +
{
a2.length);
public static void main(String args[])
}
{
}
area obj = new area();
a. 10 5
obj.area(5 , 6);
b. 5 10
System.out.println(obj.length + " " +
c. 0 10
obj.width);
d. 0 5
} }
132. Which of these is correct way of
a) 0 0
inheriting class A by class B?
b) 5 6
a. class B + class A {}
c) 6 5
b. class B inherits class A {}
d) 5 5
c. class B extends A {}
d. class B extends class A {}
129. Arrays in Java are implemented as?
a. class
133. Which two classes use the Shape class
b. object
correctly?
c. variable
A. public class Circle implements Shape
d. none of the mentioned
{
130. Which of these keywords is used to
private int radius;
prevent content of a variable from being
}
modified?

18 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

B. public abstract class Circle extends c. C,E


Shape d. T,H
{ 134. What will be the output of the
private int radius; following Java program?
} class A
C. public class Circle extends Shape {
{ int i;
private int radius; }
public void draw(); class B extends A
} {
D. public abstract class Circle int j;
implements Shape void display()
{ {
private int radius; super.i = j + 1;
public void draw(); System.out.println(j + " " + i);
} }
E. public class Circle extends Shape }
{ class inheritance
private int radius; {
public void draw() public static void main(String args[])
{ {
/* code here */ B obj = new B();
} obj.i=1;
} obj.j=2;
F. public abstract class Circle obj.display();
implements Shape }
{ }
private int radius; a) 2 2
public void draw() b) 3 3
{ c) 2 3
/* code here */ d) 3 2
}
} 135. What is not type of inheritance?
a. B,E a. Single inheritance
b. A,C b. Double inheritance

19 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. Hierarchical inheritance a. String objects are immutable, they


d. Multiple inheritance cannot be changed
b. String object can point to some other
136. Using which of the following, multiple reference of String variable
inheritance in Java can be implemented? c. StringBuffer class is used to store
a. Interfaces string in a buffer for later use
b. Multithreading d. None of the mentioned
c. Protected methods
d. Private methods 141. What will be the output of the
following Java program?
137. All classes in Java are inherited from
which class? class String_demo
a. java.lang.class {
b. java.class.inherited public static void main(String args[])
c. java.class.object {
d. java.lang.Object int ascii[] = { 65, 66, 67, 68};
String s = new String(ascii, 1, 3);
138. In order to restrict a variable of a class System.out.println(s);
from inheriting to subclass, how variable }
should be declared? }
a. Protected a. ABC
b. Private b. BCD
c. Public c. CDA
d. Static d. ABCD
142. What will be the output of the
139. If super class and subclass have same following Java program?
variable name, which keyword should be class String_demo
used to use super class? {
a. super public static void main(String args[])
b. this {
c. upper char chars[] = {'a', 'b', 'c'};
d. classname String s = new String(chars);
140. Which of these is an incorrect String s1 = "abcd";
statement? int len1 = s1.length();
int len2 = s.length();

20 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

System.out.println(len1 + " " + len2); b. Generics make code more


} optimised and readable
} c. Generics add stability to your
a. 3 0 code by making more of your
b. 0 3 bugs detectable at compile time
c. 3 4 d. Generics add stability to your code
d. 4 3 by making more of your bugs
detectable at runtime
148. Which of the following is not a Java
143. Which of these functions is called to
features?
display the output of an applet?
a. Dynamic
a. display()
b. Architecture Neutral
b. paint()
c. Use of pointers
c. displayApplet()
d. Object-oriented
d. PrintApplet()
149. What should be the execution order, if
144. Which of these methods can be used
a class has a method, static block, instance
to output a string in an applet?
block, and constructor, as shown below?
a. display()
public class First_C {
b. print()
public void myMethod()
c. drawString()
{
d. transient()
System.out.println("Method");
145. Which of these packages contains all
}
the classes and methods required for even
handling in Java?
{
a. java.applet
System.out.println(" Instance Block");
b. java.awt
}
c. java.event
d. java.awt.event
public void First_C()
146. Which of these methods are used to
{
register a mouse motion listener?
System.out.println("Constructor ");
a. addMouse()
}
b. addMouseListener()
static {
c. addMouseMotionListner()
System.out.println("static block");
d. eventMouseMotionListener()
}
147. Why are generics used?
public static void main(String[] args) {
a. Generics make code more fast

21 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

First_C c = new First_C();


c.First_C();
c.myMethod();
}
}
a. Instance block, method, static block,
and constructor
b. Method, constructor, instance block,
and static block
c. Static block, method, instance block,
and constructor
d. Static block, instance block,
constructor, and method
150. Evaluate the following Java
expression, if x=3, y=5, and z=10:
++z + y - y + z + x++
a. 24
b. 23
c. 20
d. 25

22 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

Note: Option in Bold is the Correct Option


Unit-II
a. HyperText Markup Language
1. HTML is what type of language ? b. Hyper Teach Markup Language
a. Scripting Language c. Hyper Tech Markup Language
b. Markup Language d. None of these
c. Programming Language 7. Who is Known as the father of World Wide
d. Network Protocol Web (WWW)?
2. HTML uses a. Robert Cailliau
a. User defined tags b. Tim Thompson
b. Pre-specified tags c. Charles Darwin
c. Fixed tags defined by the language d. Tim Berners-Lee
d. Tags only for linking
8. What should be the first tag in any HTML
3. The year in which HTML was first document?
proposed _______. a. <head>
a. 1990 b. <title>
b. 1980 c. <html>
c. 2000 d. <document>
d. 1995 9. How can you make a bulleted list with
4. Fundamental HTML Block is known as numbers?
___________. a. <dl>
a. HTML Body b. <ol>
b. HTML Tag c. <list>
c. HTML Attribute d. <ul>
d. HTML Element
5. Apart from <b> tag, what other tag makes 10. What tag is used to display a picture in a
text bold ? HTML page?
a. <fat> a. Picture
b. <strong> b. image
c. <black> c. img
d. <emp> d. src
11. HTML web pages can be read and rendered
6. What is the full form of HTML? by _________.

23 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

a. Compiler indicate where the interpreter is


b. Server located
c. Web Browser c. The path to the interpreter of the
d. Interpreter
script file is invalid
12. Which HTML tag produces the biggest
d. The requested HTML file or CGI
heading?
script has insufficient permission
a. <h7>
b. <h9> 16. Which attribute is used to name an element
c. <h4> uniquely?
d. <h1>
a. Class
13. Tags and texts that are not directly b. dot

displayed on the page are written in _____ c. id


section. d. all of above
<head>
17. The correct sequence of HTML tags for
<title>
starting a webpage is -
<body>
a. Head, Title, HTML, body
<html>
b. HTML, Body, Title, Head

14. Markup tags tell the web browser c. HTML, Head, Title, Body

a. How to organize the page d. HTML, Head, Title, Body

b. How to display the page


c. How to display message box on page 18. How to create an unordered list (a list with
the list items in bullets) in HTML?
d. None of these
a. <ul>
15. When trying to access a URL, the
b. <ol>
following message is displayed on the
c. <li>
browser: Server Error 403, What could be
d. <i>
the reason for the message?

a. The requested HTML file is not 19. How to insert an image in HTML?

available a. <img href = "jtp.png" />

b. The URL refers to a CGI script and b. <img url = "jtp.png" />

the header of the script does not c. <img link = "jtp.png" />
d. <img src = "jtp.png" />

24 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

20. Which of the following tag is used to define d. <link rel="stylesheet"


options in a drop-down selection list? type="text/css"
a. <select> href="example.css">
b. <list>
25. The property in CSS used to change the
c. <option>
background color of an element is -
d. <dropdown>
a. bgcolor
21. Which of the following tag is used to add
b. color
rows in the table?
c. background-color

a. <td> and </td> d. All of the above

b. <th> and </th>


c. <tr> and </tr> 26. The CSS property used to control the
d. None of the above element's font-size is -

22. What are the types of unordered or bulleted a. text-style

list in HTML? b. text-size


c. font-size
a. disc, square, triangle d. None of the above
b. polygon, triangle, circle
27. Which of the following is the correct
c. disc, circle, square
syntax to make the background-color of all
d. All of the above
paragraph elements to yellow?
23. The CSS property used to specify the
transparency of an element is - a. p {background-color : yellow;}
b. p {background-color : #yellow;}
a. Hover c. all {background-color : yellow;}
b. opacity d. all p {background-color :
c. clearfix #yellow;}
d. overlay
28. Which of the following is the correct
24. Which of the following is the correct syntax to display the hyperlinks without
syntax for referring the external style sheet? any underline?
a. <style src = example.css>
a. a {text-decoration : underline;}
b. <style src = "example.css" >
b. a {decoration : no-underline;}
c. <stylesheet> example.css
c. a {text-decoration : none;}
</stylesheet>

25 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

d. None of the above a. <html>


b. <head>
c. <title>
29. Which of the following property is used as
d. <body>
the shorthand property for the padding
34. Which tag inserts a line horizontally on
properties?
your web page?
a. padding-left
a. <hr>
b. padding-right
b. <line>
c. padding
c. <line direction="horizontal">
d. All of the above
d. <tr>
35. Which tag allows you to add a row in a
30. The CSS property used to specify the table?
transparency of an element is - a. <td> and </td>
a. opacity b. <cr> and </cr>
b. filter c. <th> and </th>
c. visibility d. <tr> and </tr>
d. overlay 36. How can you make a bulleted list?
a. <list>
b. <nl>
31. Which of the following is used to specify
c. <ul>
the subscript of text using CSS?
d. <ol>
a. vertical-align: sub
37. How can you make a numbered list?
b. vertical-align: super
a. <dl>
c. vertical-align: subscript
b. <ol>
d. None of the above
c. <list>
d. <ul>
32. Which of the following is the correct 38. How can you make an e-mail link?
syntax to select all paragraph elements in a a. <a href=”xxx@yyy ”>
div element? b. <mail href=”xxx@yyy ”>
a. div p c. <mail>xxx@yyy </mail>
b. p d. <a href=”mailto:xxx@yyy ”>
c. div#p 39. Choose the correct HTML tag to make a
d. div ~ p text italic
a. <ii>
33. Tags and text that are not directly displayed b. <italics>
on the page are written in _____ section.
26 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. <italic> c. dot
d. <i> d. all of above
40. Choose the correct HTML tag to make a 46. Which tag creates a check box for a form in
text bold? HTML?
a. <b> a. <checkbox>
b. <bold> b. <input type="checkbox">
c. <bb> c. <input=checkbox>
d. <bld> d. <input checkbox>
41. What is the correct HTML for adding a 47. To create a combo box (drop down box)
background color? which tag will you use?
a. <body color=”yellow”> a. <select>
b. <body bgcolor=”yellow”> b. <list>
c. <background>yellow</background> c. <input type="dropdown">
d. <body background=”yellow”> d. all of above
42. Choose the correct HTML tag for the 48. Which of the following is not a pair tag?
smallest size heading? a. <p>
a. <heading> b. < u >
b. <h6> c. <i>
c. <h1> d. <img>
d. <head> 49. To create HTML document you require
43. What is the correct HTML tag for inserting a. web page editing software
a line break? b. High powered computer
a. <br> c. Just a notepad can be used
b. <lb> d. None of above
c. <break> 50. HTML documents are saved in
d. <newline> a. Special binary format
44. What doesvlink attribute mean? b. Machine language codes
a. visited link c. ASCII text
b. virtual link d. None of above
c. very good link 51. The _____ character tells browsers to stop
d. active link tagging the text
45. Which attribute is used to name an element a. ?
uniquely? b. /
a. class c. >
b. id d. %

27 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

52. In HTML document the tags c. vlink="green"


a. Should be written in upper case d. None of above
b. should be written in lower case 58. How can you make an e-mail link?
c. should be written in propercase a. <a href="xxx@yyy ">
d. can be written in both uppercase or b. <mail href="xxx@yyy ">
lowercase c. <mail>xxx@yyy </mail>
53. The way the browser displays the object d. <a href="mailto:xxx@yyy ">
can be modified by _____ 59. Which tag creates a check box for a form in
a. attributes HTML?
b. parameters a. <checkbox>
c. modifiers b. <input type="checkbox">
d. None of above c. <input=checkbox>
54. Which of the following HTML code is d. <input checkbox>
valid? 60. Which of the following is an attribute of
a. <font colour="red"> <Table> tag?
b. <font color="red"> a. SRC
c. <red><font> b. LINK
d. All of above are style tags c. CELLPADDING
55. Which of the following is not a valid d. BOLD
alignment attribute? 61. What is the correct way of describing XML
a. Left data?
b. Right a. XML uses a DTD to describe data
c. Top b. XML uses a description node to describe
d. All of above data
56. Which attribute is used withimg tag to c. XML uses XSL to describe the data
display the text if image could not load in d. XML uses a validator to describe the
browser? data
a. description 62. Comments in XML document is given by:
b. name a. <?-- _ _-->
c. alt b. <!_ _ _ _!>
d. id c. <!_ _ _ _>
57. Which attribute can be used with BODY d. </_ _ _ _>
tag to set background color green? 63. Which statement is true?
a. background="green" a. An XML document can have one root
b. bgcolor="green" element

28 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

b. An XML document can have one child b. it contain an element


element c. it contains one or more elements
c. XML elements have to be in lowercase d. must contain one or more elements
d. All of the above and root element must contain all
64. What does XML stand for? other elements

a. eXtra Modern Link 69. There is a way of describing XML data,


b. eXtensible Markup Language how?
c. Example Markup Language
d. X-Markup Language a. XML uses a DTD to describe the data
b. XML uses XSL to describe data
65. What is the correct syntax of the c. XML uses a description node to
declaration which defines the XML describe data
version?: d. Both A and C

a. <xml version="A.0" /> 70. What does DTD stand for?


b. <?xml version="A.0"?>
c. <?xml version="A.0" /> a. Direct Type Definition

d. None of the above b. Document Type Definition


c. Do The Dance
66. Which statement is true? d. Dynamic Type Definition

a. All the statements are true 71. DTD includes the specifications about the
b. All XML elements must have a markup that can be used within the
closing tag document, the specifications consists of all
c. All XML elements must be lower case EXCEPT
d. All XML documents must have a DTD
a. the browser name
67. Is it easier to process XML than HTML? b. the size of element name
c. entity declarations
a. Yes d. element declarations
b. No
c. Somtimes 72. The XML DOM object is
d. Cant say
a. Entity
68. Well formed XML document means b. Entity Reference
c. Comment Reference
a. it contains a root element d. Comment Data
29 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

73. DHTML is the combination of a. Document object Manipulation


b. Document object mail
a. XML and XHTML c. Document object mean
b. HTML and JavaScript d. Document object Method
c. XHTML and HTML
d. HTML and CSS 79. JavaScript allows you to write code to
control all
74. DHTML enable a web page to be
a. XML elements
a. more interactive b. HTML Elements
b. Server interactive c. XHTML Elements
c. Client interactive d. CSS elements
d. Dynamic
80. DHTML is not a
75. "Dynamic" is defined as the ability of the
browser to a. Microsoft standard
b. Sun standard
a. alter a web page's look and style c. W3C standard
after the document has loaded d. Oracle standard
b. interact with the client
c. interact with user 81. How to access an element in HTML DOM
d. interact with the web pages ?

76. Which of these are not layer attributes ? a. document.getElementById


b. document.write
a. id c. Response.write
b. left d. Request.write
c. align
d. width

77. DHTML stands for:

a. Distributed HTML
b. Dynamic HTML
c. Distinct HTML
d. None of these

78. DOM stands for:

30 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

Note: Option in Bold is the Correct Option


Unit-III
1. Which type of JavaScript language is _ c. both conditional block and a single
statement
a. Object-Oriented
d. block that contains a single
b. Object-Based
statement
c. Assembly-language
5. The "function" and " var" are known as:
d. High-level
2. Which one of the following also known
a. Keywords
as Conditional Expression?
b. Data types
c. Declaration statements
a. Alternative to if-else
d. Prototypes
b. Switch statement
c. If-then-else statement 6. In the following given syntax of the
d. immediate if switch statement, the Expression is
compared with the labels using which
3. Among the following given JavaScript
one of the following operators?
snipped codes, which is more efficient:

switch(expression)
{
statements
}
a. Code-A
a. = = =
b. Code-B
b. equal
c. Both Code-A and Code-B
c. ==
d. Cannot Compare
d. Equals
4. In JavaScript, what is a block of
7. Which of the following variables takes
statement?
precedence over the others if the names
a. Conditional block are the same?
b. block that combines a number of
a. Global variable
statements into a single
b. The local element
compound statement
31 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. The two of the above 12. When a user views a page containing a
d. None of the above JavaScript program, which machine
actually executes the script?
8. Which of the following type of a
variable is volatile? a. The User's machine running a
Web browser
a. Mutable variable
b. The Web server
b. Dynamic variable
c. A central machine deep within
c. Volatile variable Netscape's corporate offices
d. Immutable variable d. None of the above

9. Which of the following option is used 13. ______ JavaScript is also called client-

as hexadecimal literal beginning? side JavaScript.

a. Microsoft
a. 00
b. Navigator
b. 0x
c. LiveWire
c. 0X
d. Native
d. Both 0x and 0X
14. __________ JavaScript is also called
10. In the JavaScript, which one of the server-side JavaScript.
following is not considered as an error:
a. Microsoft
a. Syntax error b. Navigator

b. Missing of semicolons c. LiveWire


d. Native
c. Division by zero
d. Missing of Bracket
15. What are variables used for in
11. Why so JavaScript and Java have JavaScript Programs?
similar name?
a. Storing numbers, dates, or other
a. JavaScript is a stripped-down version values
of Java b. Varying randomly
b. JavaScript's syntax is loosely c. Causing high-school algebra
based on Java's flashbacks
c. They both originated on the island of d. None of the above
Java
d. None of the above

32 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

16. _____ JavaScript statements embedded


in an HTML page can respond to user 20. Which of the following is not a valid
events such as mouse-clicks, form JavaScript variable name?
input, and page navigation.
a. 2names
a. Client-side b. _first_and_last_names
b. Server-side c. FirstAndLast
c. Local d. None of the above
d. Native
21. ______ tag is an extension to HTML
17. What should appear at the very end of that can enclose any number of
your JavaScript? JavaScript statements.

The <script LANGUAGE="JavaScript">tag a. <SCRIPT>


a. The </script> b. <BODY>
b. The <script> c. <HEAD>
c. The END statement
d. <TITLE>
d. None of the above
22. How does JavaScript store dates in a
18. Which of the following can't be done date object?
with client-side JavaScript?
a. The number of milliseconds
a. Validating a form since January 1st, 1970
b. Sending a form's contents by email
b. The number of days since January
c. Storing the form's contents to a
1st, 1900
database file on the server
c. The number of seconds since
d. None of the above
Netscape's public stock offering.
d. None of the above
19. Which of the following are capabilities
of functions in JavaScript?
23. Which of the following attribute can

a. Return a value
hold the JavaScript version?

b. Accept parameters and Return a


a. LANGUAGE
value
b. SCRIPT
c. Accept parameters
d. None of the above c. VERSION
33 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

d. None of the above c. <script src=" abc.js">


d. None of the above
24. What is the correct JavaScript syntax to
write "Hello World"? 28. Which types of image maps can be
used with JavaScript?
a. System.out.println("Hello World")
b. println ("Hello World") a. Server-side image maps
c. document.write("Hello World") b. Client-side image maps
d. response.write("Hello World") c. Server-side image maps and Client-
side image maps
25. Which of the following way can be d. None of the above
used to indicate the LANGUAGE 29. Which of the following navigator object
attribute? properties is the same in both
Netscape and IE?
a. <LANGUAGE="JavaScriptVersion">
b. <SCRIPT a. navigator.appCodeName
LANGUAGE="JavaScriptVersion"> b. navigator.appName
c. <SCRIPT c. navigator.appVersion
LANGUAGE="JavaScriptVersion"> d. None of the above
JavaScript statements…</SCRIPT>
d. <SCRIPT 30. Which is the correct way to write a
LANGUAGE="JavaScriptVersion"!> JavaScript array?
JavaScript statements…</SCRIPT>
26. Inside which HTML element do we put a. var txt = new
the JavaScript? Array(1:"tim",2:"kim",3:"jim")
b. var txt = new
a. <js> Array:1=("tim")2=("kim")3=("jim")
b. <scripting> c. var txt = new
c. <script> Array("tim","kim","jim")
d. <javascript> d. var txt = new Array="tim","kim","jim"

27. What is the correct syntax for referring 31. What does the <noscript> tag do?
to an external script called " abc.js"?
a. Enclose text to be displayed by non-
a. <script href=" abc.js"> JavaScript browsers.
b. <script name=" abc.js">
34 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

b. Prevents scripts on the page from d. Date


executing. 36. Choose the client-side JavaScript
c. Describes certain low-budget movies. object?
d. None of the above
32. If para1 is the DOM object for a a. Database

paragraph, what is the correct syntax to b. Cursor


c. Client
change the text within the paragraph?
d. FileUpLoad
a. "New Text"? 37. Which of the following is not
b. para1.value="New Text"; considered a JavaScript operator?
c. para1.firstChild.nodeValue= "New
Text"; a. new

d. para1.nodeValue="New Text"; b. this

33. JavaScript entities start with _______ c. delete


d. typeof
and end with _________.
38. ______method evaluates a string of
a. Semicolon, colon JavaScript code in the context of the
b. Semicolon, Ampersand specified object.
c. Ampersand, colon
d. Ampersand, semicolon a. Eval
34. Which of the following best describes b. ParseInt

JavaScript? c. ParseFloat
d. Efloat
a. a low-level programming language.
b. a scripting language precompiled in 39. Which of the following event fires
the browser. when the form element loses the focus:
c. a compiled scripting language. <button>, <input>, <label>, <select>,
d. an object-oriented scripting
<textarea>?
language.
a. onfocus
35. Choose the server-side JavaScript b. onblur
object? c. onclick
d. ondblclick
a. FileUpLoad
b. Function 40. The syntax of Eval is ____
c. File
35 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

a. [objectName.]eval(numeriC. b. dateObjectName.new
b. [objectName.]eval(string) Date([parameters])
c. [EvalName.]eval(string) c. dateObjectName := new
d. [EvalName.]eval(numeriC. Date([parameters])
41. JavaScript is interpreted by _________ d. dateObjectName Date([parameters])
45. The _______ method of an Array
a. Client
object adds and/or removes elements
b. Server
from an array.
c. Object
d. None of the above a. Reverse
42. Using _______ statement is how you b. Shift
test for a specific condition. c. Slice
d. Splice
a. Select
b. If
46. To set up the window to capture all
c. Switch
Click events, we use which of the
d. For
following statement?

a. window.captureEvents(Event.CLICK);
43. Which of the following is the structure b. window.handleEvents (Event.CLICK);
of an if statement? c. window.routeEvents(Event.CLICK );
d. window.raiseEvents(Event.CLICK );
a. if (conditional expression is true)
thenexecute this codeend if
47. Which tag(s) can handle mouse events
b. if (conditional expression is
in Netscape?
true)execute this codeend if
c. if (conditional expression is true) a. <IMG>
{then execute this code>->} b. <A>
d. if (conditional expression is true) then c. <BR>
{execute this code} d. None of the above
44. How to create a Date object in
JavaScript? 48. ____________ is the tainted property of
a window object.
a. dateObjectName = new
Date([parameters]) a. Pathname
b. Protocol
36 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. Defaultstatus c. JavaObject
d. Host d. Jobject
49. To enable data tainting, the end user 53. _________ is a wrapped Java array,
sets the _________ environment accessed from within JavaScript code.
variable.
a. JavaArray
a. ENABLE_TAINT b. JavaClass
b. MS_ENABLE_TAINT c. JavaObject
c. NS_ENABLE_TAINT d. JavaPackage
d. ENABLE_TAINT_NS 54. A ________ object is a reference to one
of the classes in a Java package, such as
50. In JavaScript, _________ is an object netscape.javascript .
of the target language data type that
a. JavaArray
encloses an object of the source
b. JavaClass
language.
c. JavaObject

a. a wrapper d. JavaPackage

b. a link
c. a cursor 55. To open a dialog box each time an error
d. a form occurs, which of the following is added
to prefs.js?
51. When a JavaScript object is sent to
a. user_pref("javascript.classic.error
Java, the runtime engine creates a Java
_alerts", true);
wrapper of type ___________
b. user_pref("javascript.classic.error_al

a. ScriptObject erts ", false);

b. JSObject c. user_pref("javascript.console.open_o

c. JavaObject n_error ", true);

d. Jobject d. user_pref("javascript.console.open_o

52. _______ class provides an interface for n_error ", false);

invoking JavaScript methods and 56. The syntax of a blur method in a button

examining JavaScript properties. object is ______________

a. ScriptObject a. Blur()

b. JSObject b. Blur(contrast)
c. Blur(value)
37 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

d. Blur(depth) a. Returns the VALUE of a selected


OPTION.
57. The syntax of close method for b. Returns document.URL of the window
document object is ______________ in focus.
c. Returns the value of cursor-selected
a. Close(doC. text
b. Close(object) d. Returns the VALUE of a checked
c. Close(val) radio input.
d. Close() 62. Choose the client-side JavaScript
object:
58. <script type="text/javascript">
a. Database
x=4+"4"; b. Cursor
document.write(x); c. Client
</script> d. FileUpLoad
Output------?
a. 44 63. What is mean by "this" keyword in
b. 8
javascript?
c. 4
d. Error output a. It refers current object
59. Is it possible to nest functions in b. It referes previous object
JavaScript? c. It is variable which contains value
d. None of the above
a. True
b. False 64. In JavaScript, Window.prompt()
<script>
method return true or false value ?

60. Scripting language are a. False


b. True
a. High Level Programming language
65. <script language="javascript">
b. Assembly Level programming
language function x()
c. Machine level programming language {
61. Which best explains getSelection()? document.write(2+5+"8");
}
</script>

38 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

a. 258 d. All of these


b. Error
c. 7 70. ______________ is the sever support
d. 78 AJAX ?

66. <script type="text/javascript"> a. WWW


b. SMTP
var s = "9123456 or 80000?"; c. HTTP
var pattern = /\d{4}/; d. None of the above
var output = s.match(pattern);
document.write(output); 71. what is the full form of AJAX ?
</script>
a. 9123 a. Asynchronous Javascript and XML
b. 91234 b. Another Java and XML Library
c. 80000 c. Abstract JSON and XML
d. None of the above d. None of the mentioned

67. Which of the following is AJAX? 72. Which of the following makes Ajax
unique?
a. is a program
b. is a country name a. It works the same with all Web
c. is a football club name browsers.
d. All of these b. It works as a stand-alone Web-
68. Which of the following are the features development tool.
of Ajax? c. It makes data requests
asynchronously.
a. Live data binding d. It uses C++ as its programming
b. Declarative instantiation of client language.
components
c. Client-side template rendering 73. _________________ combination of
d. All of the above technologies gives AJAX its name.

69. The advantages of Ajax is __ a. ASP and XAML


b. Atlas and XML
a. Bandwidth utilization c. Asynchronous JavaScript and XML
b. More interactive d. None of the mentioned
c. Speeder retrieval of data

39 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

74. Which of the following made AJAX a. JSU

popular. b. JSUnit
c. AjaxJSU
a. IBM d. JSUnitAjax
b. Microsoft 80. In Ajax ______________ready states
c. Sun Micro system are available.
d. Google
a. 4
75. AJAX can work with web application. b. 6
c. 8
a. true d. 2
b. False

81. How many types of triggers are present


76. Which of the following technology is in update panel?
not used by Ajax?
a. 2
a. JavaScript b. 3
b. Document Object Model c. 4
c. XMLHttpRequest d. 5
d. Flash 82. which of the following are the controls
77. Which of the following are controls of of Ajax?
Ajax except ?
a. ScriptManager
a. ScriptManager b. ScriptManagerProxy
b. UpdateData c. UpdateProgress
c. ScriptManagerProxy d. All of the mentioned
d. UpdatePanel 83. _______ are the advantages of Ajax?
78. _______is the name of the DLL that
contains Ajax control tool kit? a. Bandwidth utilization
b. More interactive
a. Ajaxtoolkit.dll c. Speeder retrieval of data
b. Ajaxcontroltoolkit.dll d. All of above
c. Ajaxcontrol.dll
d. control.dll 84. What are the disadvantages of Ajax?

79. How can you test the Ajax code? a. Debugging is difficult

40 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

b. Increases size of the requests 89. Which classes are used for connection-
c. Slow and unreliable network oriented socket programming?
connection.
d. All of the mentioned above a. Socket
b. ServerSocket

85. ________are the methods used for cross c. Both A & B

domain Ajax calls? d. None of the above

a. CORS
b. JSONP 90. Which class can be used to create a
c. both 1 & 2 server socket. This object is used to
d. None of the above establish communication with the
clients?
86. What are the technologies used by
Ajax? a. ServerSocket
b. Socket
a. XMLHttpRequest c. Both A & B
b. Cascading Style Sheets (CSS) d. None of the above
c. Extensible HTML (XHTML)
d. All of the above 91. Which methods are commonly used in
87. Show some networking terminologies ServerSocket class?
given below?
a. public OutputStream
a. IP Address getOutputStream()
b. Protocol b. public Socket accept()
c. MAC Address c. public synchronized void close()
d. All mentioned above d. None of the above

88. TCP,FTP,Telnet,SMTP,POP etc. are 92. The URLConnection class can be used
examples of ? to read and write data to the specified
resource referred by the URL?
a. Socket
b. IP Address a. True
c. Protocol b. False
d. MAC Address

41 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. IPAddress
93. The java.net.InetAddress class d. None of the choices are correct.

represents an? 98. In Java, which of the following


statement is true?
a. Socket
b. IP Address a. To create IPv4 address we must use
c. Protocol Inet4Address class.
d. MAC Address b. To create IPv6 address we must use
94. In InetAddress class which method it Inet6Address class.
returns the host name of the IP c. We can use InetAddress class to

Address? create both IPv4 and IPv6


addresses.
a. public String getHostName() d. None of the choices are correct.
b. public String getHostAddress() 99. A port number in Java is defined as
c. public static InetAddress _____integer.
getLocalHost()
d. None of the above a. a 16-bit integer
95. Which classes are used for connection- b. a 24-bit integer

less socket programming? c. a 48-bit integer


d. None of the choices are correct.
a. DatagramSocket 100. The class used in Java network
b. DatagramPacket programming for socket address is the
c. Both A & B ____class.
d. None of the above
96. Network programming in any language a. InetAddress
definitely needs to deal with __and __ b. SocketAddress
c. InetSocketAddress
a. user names; port numbers d. None of the choices are correct.
b. IP addresses; link-layer address 101. A server in a client-server
c. IP addresses; port numbers paradigm can be designed either as an
d. None of the choices are correct.
_______ server or a _________ server.
97. In Java, an IP address is defined as an
object, the instance of _______ class. a. asynchronous; concurrent
b. iterative; concurrent
a. InetAddress c. simultaneous; intermittent
b. SocketAddress d. None of the choices are correct.
42 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

102. A concurrent server can server 107. Java implementation of TCP uses
_____ ___types of socket objects.

a. one client at a time a. only one


b. only two clients simultaneously b. only two
c. several clients simultaneously c. Many types
d. None of the choices are correct. d. None of the choices are correct.
103. An iterative server handles _____ 108. In Java implementation of TCP, a
client uses ____; a server uses _____.
a. one client at a time
b. two clients simultaneously a. ClientSocket object; ServerSocket
c. several clients simultaneously object
d. None of the choices are correct. b. Socket object; ServerSocket objec
104. Java implementation of UDP uses c. Socket object; ServerSocket object
______ and Socket object
d. None of the choices are correct.
a. only one type of socket objects 109. ServerSocket is sometimes called
b. two types of socket objects
the _____ and or the ____ socket.
c. many types of socket objects
d. None of the choices are correct. a. passive socket; listen socket
105. The DagramSocket class is used to b. active socket; listen socket
create sockets ________________. c. waiting socket; listen socket
d. None of the choices are correct.
a. in the UDP client 110. ____________ is responsible for
b. in the UDP server
establishing a connection.
c. in both the UDP client and UDP
server a. Socket
d. None of the choices are correct. b. ServerSocket
106. The ________________ class is c. ClientSocket
used to create datagram packets. d. None of the choices are correct.
111. In Java two methods,
a. DatagramPacket
getOutputStream and getInputStream,
b. DagramSocket
are provided in the ________ class.
c. DagramSocket or DatagramPacket
d. None of the choices are correct. a. ServerSocket
b. Socket

43 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. Stream
d. None of the choices are correct.
112. How many ports of TCP/IP are
reserved for specific protocols?

a. 10
b. 1024
c. 2048
d. 512
113. Which of these class is used to
encapsulate IP address and DNS?

a. DatagramPacket
b. URL
c. InetAddress
d. ContentHandler

44 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

Note: Option in Bold is the Correct Option


Unit-IV
1. Which services are provided to EJB
components by the EJB container? 6. JMS is mainly used to send and receive
a. Transaction support message from one application to another.
b. Persistence support a. True
c. Naming support b. False
d. All mentioned above 7. Which session bean maintain their state
2. Which case of a session bean obtains the between client invocations but are not
UserTransaction object via the EJBContext required to maintain their state across
using the getUserTransaction() method in server crashes or shutdowns?
EJB transaction management? a. Stateful Session Bean
a. Bean-managed transactions b. Stateless Session Bean
b. Container-managed transactions c. Singleton Session Bean
c. Both A & B d. None of the above
d. None of the above
Answer Explanation 8. Which EJB container must provide an
3. EJB QL is a Query Language provided for implementation of Java Naming and
navigation across a network of enterprise Directory Interface (JNDI) API to provide
beans and dependent objects defined by naming services for EJB clients and
means of container managed persistence. components?
a. True a. Transaction support
b. False b. Persistence support
4. A message driven bean is like statefull c. Naming support
session bean that encapsulates the business d. All mentioned above
logic and doesn't maintain state. 9. EJB is a specification for J2EE server, not
a. True a product; Java beans may be a graphical
b. False component in IDE.
5. Abbreviate the term JMS? a. True
a. Java Message Service b. False
b. Java Monitor Service 10. A session bean represents a multiple clients
c. Java Message Session inside the Application Server.
d. Java Monitor Session a. True

45 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

b. False d. None of the above


11. Which component does the Entity bean 17. In EJB, middleware services are provided
represent the persistent data stored in the by EJB Container automatically.
database? a. True
b. False
a. Server-side component 18. Which middleware services are provided
b. Client-side component by EJB?
c. server and client side component a. Security
d. None of the above b. Transaction Management
c. Both A & B
12. EJB is a specification for J2EE server, not a d. None of the above
product; Java beans may be a graphical 19. Which server-side component is required to
component in IDE. be deployed on the server?
a. True a. EJB
b. False b. RMI
13. EJB is like COM, Abbreviate the term c. Both A & B
COM? d. None of the above
a. Component Object Model 20. How many types of session beans are
b. Component Oriented Model available in EJB?
c. Common Object Model a. 2
d. Common Oriented Model b. 3
c. 4
14. JMS is also known as a messaging service. d. 5
a. True 21. Which type of instances retain no data or
b. False conversational state for a specific client?
15. The life cycle of session bean is not a. Message-Driven Bean
maintained by the application server (EJB b. Session Bean
Container). c. Entity Bean
a. True d. None of the above
b. False
16. What represents a persistent global data 22. Which middleware services are provided
from the database? by EJB?
a. Entity Bean a. Security
b. Session Bean b. Transaction Management
c. Both A & B c. Both A & B

46 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

d. None of the above 28. Which of the following EJB has no state?
23. Which session bean does the conversational i. Message-Driven Bean.
state between multiple method calls is not ii. BMP Entity Bean.
maintained by the container? iii. Stateless Session Bean.
iv. Stateful Session Bean.
a. Stateful Session Bean
b. Stateless Session Bean a. Both (I) and (II) above
c. Singleton Session Bean b. Both (II) and (III) above
d. None of the above c. Both (III) and (IV) above
24. EJB technology is built on the top of d. Both (I) and (III) above.
Socket Programming
a. True 29. Which of the following is true for EJB?
b. False
25. Which of the following is not true about a. EJB is server-side component
Java beans? architecture for distributed
a. Implements java.io.Serializable applications in Java
interface b. EJB facilitates scalable, secure and
b. Extends java.io.Serializable class transaction-oriented applications
c. Provides no argument constructor c. EJB supports portability and
d. Provides setter and getter methods for reusability
its properties d. All of the above.
26. Which of the following is the format for
EJB deployment descriptor files? 30. Which of the following EJB type has no
a. XML Remote interfaces?
b. XSL a. Message-Driven Bean
c. HTML b. BMP Entity Bean
d. Java c. Session Bean
27. EJB is a d. Sessionless Bean.

a. Middleware 31. Which role in EJB architecture is


b. Scalable component architecture responsible for EJB Server?
c. Component architecture to integrate a. EJB Deployer
legacy systems b. Application Assembler
d. All of the above. c. Network Engineer
d. Server Provider

47 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

(b) Consistency
32. Which of the EJB has a passive state in its (c) Isolation
life cycle? (d) Distributed
I. Stateless Session Bean.
II. Message-Driven Bean. 36. Which EJB usually represents persistent
III. BMP Entity Bean. data?
a. Entity Bean
a. Only (I) above b. Stateless Session Bean
b. Only (II) above c. Stateful Session Bean
c. Only (III) above d. Message-Driven Bean
d. Both (I) and (II) above 37. Which is least visibility scope for Java bean
e. Both (II) and (III) above. in JSP?
33. Which part of multi-tier enterprise a. Page
application contains EJB component? b. Session
a. Application Server c. Request
b. Web Server d. Application
c. Database Server 38. Which of the following annotation is used
d. Fat Client to specify or inject a dependency as ejb
e. Thin Client. instance into another ejb?
34. Which of the following distributed object a. javax.ejb.Stateless
technology is/are not included in Java? b. javax.ejb.Stateful
I. CORBA. c. javax.ejb.MessageDrivenBean
II. DCOM. d. javax.ejb.EJB
III. RMI. 39. The EJB specification architecture does
IV. EJB. NOT define
a. transactional components
a. Only (I) above b. client side security and encryption
b. Only (II) above c. distributed object components
c. Only (III) above d. server-side components
d. Only (IV) above 40. Which case of a session bean obtains the
e. All (I), (II), (III) and (IV) above. UserTransaction object via the EJBContext
using the getUserTransaction() method in
35. Which of the following is not a property of EJB transaction management?
EJB transaction? a. Bean-managed transactions
(a) Atomicity b. Container-managed transactions

48 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. Both A & B a. java.sql.TimeStamp


d. None of the above b. java.sql.Time
41. Session beans don’t have c. java.io.Time
a. ejbCreate() method d. java.io.TimeStamp
b. ejbStore() method 47. What does setAutoCommit(false) do?
c. ejbRemove() method a. commits transaction after each query
d. None b. explicitly commits transaction
42. An entity bean's local interface MUST c. does not commit transaction
extend the ________ interface. automatically after each query
a. javax.ejb.EJBLocalObject d. never commits transaction
b. javax.ejb.EJBObject
c. javax.ejb.RemoteObject 48. Which of the following is used to call
d. None of the above stored procedure?
43. What is returned by the method ejbCreate() a. Statement
CMP bean? b. PreparedStatement
a. Null c. CallableStatment
b. Primary Key class d. CalledStatement
c. Home Object
d. Remote Object 49. Which of the following is used to limit the
number of rows returned?
44. Which of the following is advantage of a. setMaxRows(int i)
using JDBC connection pool? b. setMinRows(int i)
a. Slow performance c. getMaxrows(int i)
b. Using more memory d. getMinRows(int i)
c. Using less memory 50. Which of the following is method of JDBC
d. Better performance batch process?
a. setBatch()
45. Which of the following is advantage of b. deleteBatch()
using PreparedStatement in Java? c. removeBatch()
a. Slow performance d. addBatch()
b. Encourages SQL injection 51. Which of the following is used to rollback a
c. Prevents SQL injection JDBC transaction?
d. More memory usage a. rollback()
46. Which one of the following contains date b. rollforward()
information? c. deleteTransaction()

49 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

d. RemoveTransaction() d. None of the above


52. Which of the following is not a JDBC 57. Which JDBC driver Type(s) can you use in
connection isolation levels? a three-tier architecture and if the Web
a. TRANSACTION_NONE server and the DBMS are running on the
b. TRANSACTION_READ_COMMITT same machine?
ED a. Type 1 only
c. TRANSACTION_REPEATABLE_R b. Type 2 only
EA c. Both Type 3 and Type 4
d. TRANSACTION_NONREPEATAB d. All of Type 1, Type 2, Type 3 and
LE_READ Type 4
53. How many JDBC driver types does Sun 58. Which JDBC driver Type(s) is(are) the
define? JDBC-ODBC bridge?
a. One a. Type 1
b. Two b. Type 2
c. Three c. Type 3
d. Four d. Type 4

54. Where is metadata stored in MySQL? 59. Which JDBC driver Types are for use over
a. In the MySQL database metadata communications networks?
b. In the MySQL database metasql a. Type 3 only
c. In the MySQL database mysql b. Type 4 only
d. None of the above is correct. c. Both Type 3 and Type 4
d. Neither Type 3 nor Type 4
55. Which JDBC driver Type(s) can be used in
either applet or servlet code? 60. JDBC stands for:
a. Both Type 1 and Type 2 a. Java Database Connectivity
b. Both Type 1 and Type 3 b. Java Database Components
c. Both Type 3 and Type 4 c. Java Database Control
d. Type 4 only d. None of the above is correct.
61. Which of the following is correct about
56. What MySQL property is used to create a Statement class of JDBC?
surrogate key in MySQL? a. Statement encapsulates an SQL
a. UNIQUE statement which is passed to the
b. SEQUENCE database to be parsed and compiled.
c. AUTO_INCREMENT

50 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

b. Statement encapsulates an SQL d. getConnection()


statement which is passed to the
database to be planned and executed. 66. Which are the new features adding in to the
c. Both of the above. JDBC 4.0?
d. none of the above. a. Auto-loading of JDBC driver class
b. Connection management
62. Which of the following type of JDBC enhancements
driver, uses database native protocol? c. Support for RowId SQL type
a. JDBC-ODBC Bridge plus ODBC d. All of the above
driver 67. When the message "No Suitable Driver"
b. Native-API, partly Java driver occurs?
c. JDBC-Net, pure Java driver a. When the driver is not registered
d. Native-protocol, pure Java driver by Class.forname() method
63. What is, in terms of JDBC, a DataSource? b. When the user name, password
a. A DataSource is the basic service for and the database does not match
managing a set of JDBC drivers c. When the JDBC database URL
b. A DataSource is the Java passed is not constructed
representation of a physical data properly
source d. When the type 4 driver is used
c. A DataSource is a registry point for
JNDI-services 68. The interface ResultSet has a method,
d. A Data Source is a factory of getMetaData(), that returns a/an
connections to a physical data a. Tuple
source b. Value
64. Which method is used to perform DML c. Object
statements in JDBC? d. Result
a. execute()
b. executeQuery()
c. executeUpdate()
d. executeResult()
65. Which of the following methods are needed
for loading a database driver in JDBC?
a. registerDriver() method
b. Class.forName()
c. Both A and B

51 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

Note: Option in Bold is the Correct Option


Unit-V
d. session.setAttribute(String name)
1. How constructor can be used for a servlet? 5. Which method is used to get three-letter
a. Initialization abbreviation for locale’s country in servlets?
b. Constructor function a. Request.getISO3Country()
c. Initialization and Constructor b. Locale.getISO3Country()
function c. Response.getISO3Country()
d. Setup() method d. Local.retrieveISO3Country()
2. Can servlet class declare constructor with 6. Which of the following code retrieves the
ServletConfig object as an argument? body of the request as binary data?
a. True a. DataInputStream data = new
b. False InputStream()
b. DataInputStream data =
3. What is the difference between servlets and response.getInputStream()
applets? c. DataInputStream data =
i. Servlets execute on Server; Applets execute request.getInputStream()
on browser d. DataInputStream data =
ii. Servlets have no GUI; Applet has GUI request.fetchInputStream()
iii. Servlets creates static web pages; Applets
creates dynamic web pages 7. When destroy() method of a filter is called?
iv. Servlets can handle only a single request; a. The destroy() method is called only
Applet can handle multiple requests once at the end of the life cycle of a
a. i, ii, iii are correct filter
b. i, ii are correct b. The destroy() method is called after
c. i, iii are correct the filter has executed doFilter
d. i, ii, iii, iv are correct method
4. Which of the following code is used to get c. The destroy() method is called only
an attribute in a HTTP Session object in once at the begining of the life cycle
servlets? of a filter
a. session.getAttribute(String name) d. The destroyer() method is called
b. session.alterAttribute(String name) after the filter has executed
c. session.updateAttribute(String name)

52 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

8. Which of the following is true about 11. Connection Pooling Class manages no of
servlets? user requests for connections to improve the
a. Servlets execute within the address performance.
space of web server a. True
b. Servlets are platform-independent b. False
because they are written in java 12. Which object of HttpSession can be used
c. Servlets can use the full functionality of to view and manipulate information about a
the Java class libraries session?
d. Servlets execute within the address a. session identifier
space of web server, platform b. creation time
independent and uses the c. last accessed time
functionality of java class libraries d. All mentioned above
13. Using mail API we cannot send mail
9. How is the dynamic interception of requests from a servlet.
and responses to transform the information a. True
done? b. False
a. servlet container
b. servlet config 14. Which class provides stream to read binary
c. servlet context data such as image etc. from the request
d. servlet filter object?

10. Which are the session tracking techniques? a. ServltInputStream


i. URL rewriting b. ServletOutputStream
ii. Using session object c. Both A & B
iii.Using response object d. None of the above
iv. Using hidden fields 15. The sendRedirect() method of
v. Using cookies HttpServletResponse interface can be used to
vi. Using servlet object redirect response to another resource, it may
a. i, ii, iii, vi be servlet, jsp or html file.
b. i, ii, iv, v a. True
c. i, vi, iii, v b. False
d. i, ii, iii, v 16. Which of these ways used to communicate
from an applet to servlet?
a. RMI Communication
b. HTTP Communication

53 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

c. Socket Communication b. False


d. All mentioned above
17. Which methods are used to bind the 22. Web server is used for loading the init()
objects on HttpSession instance and get the method of servlet.
objects? a. True
a. setAttribute b. False
b. getAttribute 23. Servlets handle multiple simultaneous
c. Both A & B requests by using threads.
d. None of the above a. True
b. False
18. Which type of ServletEngine is a server 24. Which method is used to send the same
that includes built-in support for servlets? request and response objects to another servlet
a. Add-on ServletEngine in RequestDispacher ?
b. Embedded ServletEngine a. forward()
c. Standalone ServletEngine b. sendRedirect()
d. None of the above c. Both A & B
d. None of the above
19. What type of servlets use these methods 25. Which packages represent interfaces and
doGet(), doPost(),doHead, doDelete(), classes for servlet API?
doTrace()? a. javax.servlet
a. Genereic Servlets b. javax.servlet.http
b. HttpServlets c. Both A & B
c. All of the above d. None of the above
d. None of the above 26. Which class can handle any type of request
20. Which cookie it is valid for single session so that it is protocol-independent?
only and it is removed each time when the user a. GenericServlet
closes the browser? b. HttpServlet
a. Persistent cookie c. Both A & B
b. Non-persistent cookie d. None of the above
c. All the above 27. Which HTTP Request method is non-
d. None of the above idempotent?
21. Sessions is a part of the SessionTracking a. GET
and it is for maintaining the client state at b. POST
server side. c. BOTH A & B
a. True d. None of the above

54 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

28. Which object is created by the web d. All mentioned above


container at time of deploying the project? 33. Which are the examples of Application
a. ServletConfig Server?
b. ServletContext a. Apache
c. Both A & B b. JBoss
d. None of the above c. Weblogic
29. What is the lifecycle of a servlet? d. Both b & c
- Published on 15 Jul 15 34. How many techniques are used in Session
Tracking?
a. Servlet class is loaded a. 4
b. Servlet instance is created b. 3
c. init,Service,destroy method is c. 2
invoked d. 5
d. All mentioned above 35. In HTTP Request method Get request is
30. Which method in session tracking is used secured because data is exposed in URL bar
in a bit of information that is sent by a web a. True
server to a browser and which can later be read b. False
back from that browser? 36. In the following statements identify the
a. HttpSession disadvantages of CGI?
b. URL rewriting a. If number of clients increases, it
c. Cookies takes more time for sending response
d. Hidden form fields b. For each request, it starts a process
31. In HTTP Request what asks for the and Web server is limited to start
loopback of the request message, for testing or processes
for troubleshooting? c. It uses platform dependent language
a. PUT e.g. C, C++, perl
b. OPTIONS d. All mentioned above
c. DELETE 37 Servlet technology is used to create web
d. TRACE application
32. Which one of the following scopes does a. True
the attribute in servlet is an object that can be b. False
set, get or removed?
a. session scope 38. Which of the following are the principal
b. request scope stages in the life cycle of Java Servlet.
c. application scope i) Server Initialization

55 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

ii) Servlet Execution 41. Which of the following methods are


iii) Servlet Destruction provided to enable the servlet to process the
iv) Servlet Stop client’s request.
a. i, ii, and iii only i) getCookies()
b. i, iii, and iv only ii) getRequest()
c. ii, iii, and iv only iii) getSession()
d. All i, ii, iii, and iv only iv) getHeader()
39. State whether the following statements a. i, ii, and iii only
about the Java servlet life cycle are True or b. i, iii, and iv only
False. c. ii, iii, and iv only
i) init() and destroy() method will be called d. All i, ii, iii, and iv only
only once during the lifetime of the servlet. 42. State whether the following statements on
ii) Once the servlet is initialized any request the methods of HTTP servlet request are
that the servlet container receives will be True or False.
forwarded to the servlet’s execute() method. i) For the getHeader method, the match
a. i-True, ii-True between the given name and the request
b. i-True, ii-False header is case insensitive.
c. i-False, ii-True ii) If there is no query string, getQueryString
d. i-False, ii-False method returns null.
a. i-True, ii-True
40. Which of the following are the advantages b. i-True, ii-False
of Java Servlet over the other common c. i-False, ii-True
server extensions. d. i-False, ii-False
i) Java servlets are faster than other server
extensions like CGI scripts. 43. . … are the methods provided by HTTP
ii) Java servlets use a standard API that is servlet response to formulate the response
supported by many browsers. to the client.
iii) Java servlets are portable between server i) sendRedirect
and operating system. ii) getWriter
a. i and ii only iii) sendError
b. ii and iii only a. i and ii only
c. i and iii only b. ii and iii only
d. All i, ii and iii c. i and iii only
d. All i, ii and iii

56 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

44. . … method obtains a byte-based output c. i and iii only


stream that enables binary data to be sent to d. All i, ii and iii
the client.
a. sendRedirect 48. State whether the following statements
b. getOutput() about the methods of cookies that are used
c. getOutputStream() for section tracking are True or False.
d. getWirter i) A zero value on the Cookie.SetMaxAge(int
expiry) tells the browser to delete the cookie
45. . … method obtains a character-based immediately.
output stream that enables text data to be ii) If no maximum age was specified the
sent to the client. getMaxAge() method returns zero.
a. sendRedirect a. i-True, ii-True
b. getOutput() b. i-True, ii-False
c. getOutputStream() c. i-False, ii-True
d. getWirter d. i-False, ii-False

46. State whether the following statements 49. State whether the following statements
about the methods provided by HTTP about the interfaces included in the servlet
servlet response are True or False. API are True or False.
i) The addCookie method must be called i) The HttpServletRequest provides access to
before the response is committed so that the an input stream and so allows the servlet to
appropriate headers can be set. read data from the client.
ii) Further output should be made by the ii) The HttpServletResponse provides access
servlet after calling the sendError method. to an output stream and so allows the servlet to
a. i-True, ii-True send data to the client.
b. i-True, ii-False a. i-True, ii-True
c. i-False, ii-True b. i-True, ii-False
d. i-False, ii-False c. i-False, ii-True
47. Which of the following are the methods of d. i-False, ii-False
cookies that are used for section tracking. 50. State whether the following statements
i) getMaxAge() about the GET method are True.
ii) getValue() i) In the GET method entire form submission
iii) getDate() can be encapsulated in one URL.
a. i and ii only ii) The query length is limited to 256
b. ii and iii only characters.

57 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

iii) The data is submitted as a part of the URL. 54. Which of the following are the life cycle
a. i and ii only method of jsp?
b. ii and iii only a. jspInit()
c. i and iii only b. _jspService()
d. All i, ii and iii c. jspDestroy()
d. All of the above
51. State whether the following statements
about the POST method are True or False. 55. Request processing of JSP is done by
i) In the POST method, data is submitted calling which method?
inside the body of the HTTP request. a. jspInit()
ii) Here the data is visible on the URL and less b. _jspService()
secure. c. jspDestroy()
a. i-True, ii-True d. _jspRequest()
b. i-True, ii-False
c. i-False, ii-True 56. Which of the following method helps in jsp
d. i-False, ii-False page initialization?
52. What is full form of JSP? a. jspInit()
a. Java Service Provider b. _jspService()
b. Java Service Pages c. jspDestroy()
c. Java Server Provider d. init()
d. Java Server Pages 57. Which of the following is correct about
53. Which of the following is true about JSP? JSP?
1. JSP page is translated into Servlet.
1.JSP technology is used to create web 2. JSP translator is a part of the web server
application. which is responsible for translating the JSP
2. The JSP pages are not easier to maintain page into Servlet.
than Servlet. a. only 1
3. JSP page consists of HTML tags and JSP b. only 2
tags. c. Both 1 & 2
a. 1&2 d. None
b. 1 & 3 58. Which of the following folder in JSP
c. 2&3 project contains web.xml file?
d. All of the above a. META-INF
b. WEB-INF
c. context-root

58 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

d. Any of A & B This represents:


a. scriptlet tag
59. Arrange in correct sequence of JSP life b. expression tag
cycle. c. declaration tag
1. Instantiation d. taglib directive
2. Request processing
3. Initialization 64. Which of the following scripting elements
4. Classloading can be used to declare methods and fields?
5. Compilation of JSP Page a. scriptlet tag
6. Destroy b. expression tag
7. Translation of JSP Page c. declaration tag
d. All of the above
a. 7-5-4-1-3-2-6
b. 6-5-4-1-3-2-7 65. How many implicit objects are there in jsp?
c. 1-5-4-7-3-2-6 a. 7
d. 7-5-4-3-1-2-6 b. 8
60. In JSP, java code can be written inside the c. 9
jsp page using _____________ d. 10
a. scriptlet tag 66. Which of the following are implicit objects
b. expression tag in jsp?
c. declaration tag a. request
d. JSP include directive b. config
61. Which of the following can be used as c. application
scripting elements in jsp? d. all of the above
a. scriptlet tag 67. Which of the following is not implicit
b. expression tag object in jsp?
c. declaration tag a. session
d. All of the above b. page
62. The code placed within _______ is written c. pageContext
to the output stream of the response. d. cookies
a. declaration tag 68. _________ can be used to get request
b. scriptlet tag information such as parameter, header
c. expression tag information, remote address, server name,
d. All of the above server port, content type, character encoding
63. <%= statement %> etc.

59 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

a. JSP request a. jsp:forward


b. JSP response b. jsp:useBean
c. JSP config c. jsp:setProperty
d. JSP session d. jsp:setException

69. The ________ object is created by the web 74. Which of the following is/are jsp action
container for each jsp page. tags?
a. application a. jsp:getProperty
b. config b. jsp:plugin
c. exception c. jsp:fallback
d. All of the above d. All of the above
70. This object can be used to get initialization 75. ______ action tag helps embeds another
parameter from configuaration file components such as applet.
(web.xml) a. jsp:plugin
a. config b. jsp:config
b. application c. jsp:setProperty
c. session d. jsp:fallback
d. request 76. <%@ page ... %>
71. Which of the following is not a jsp directive Above jsp element defines page-dependent
element? attributes, such as:
a. page directive a. scripting language
b. include directive b. error page
c. taglib directive c. buffering requirements
d. session directive d. All of the above

72. The pageContext object can be used to set or 77. <%@ include ... %>
get or remove attributes from which of the This jsp element helps to:
following scopes a. Includes a file during the translation
a. request phase
b. session b. Includes plugins during the translation
c. application phase
d. All of the above c. Declares a tag library, containing
custom actions, used in the page
73. Which of the following is not a jsp action d. there is no such jsp element available
tag?

60 University Academy
www.aktutor.in
WEB TECHNOLOGY 2020-21

78. <%@ taglib ... %> b. A JSP page can be sent as-is to the
above jsp element is used to: browser
a. Declare a tag library used in the page c. The JSP container is often
b. Declare scripting language implemented as a servlet configured to
handle all requests for JSP pages.
c. Declare error page d. A JSP container is responsible for
d. All of the above converting the JSP page into a servlet

79. Which of the following jsp element makes a 83. The difference between Servlets and JSP is
JavaBeans component available in a page? the …………….
a. jsp:useBean element a. Translation
b. jsp:getProperty element b. Compilation
c. jsp:include element c. Syntax
d. jsp:plugin element d. Both A and B
84. Which attribute specifies a JSP page that
80. Gets a property value from a JavaBeans should process any exceptions thrown but
component and adds it to the response in jsp not caught in the current page?
a. jsp:getProperty element a. The ErrorPage Attribute
b. jsp:setProperty element b. The IsErrorPage Attribute
c. jsp:param element c. Both A & B
d. jsp:includeProperty element d. None of the above
81. Which of the following are scopes provided
by jsp:
a. Page, Request, Session, Global-
Session
b. Page, Request, Session, Application,
Global-Session
c. Page, Request, Session, Application
d. Page, Request, Session, Application,
Response
82. Which of the following is not correct
statement related to jsp?
a. A JSP page cannot be sent as-is to the
browser

61 University Academy

You might also like