Font size
WorksheetsWeb Technology Lab (BCS552) - Internal Exam
Total questions: 100
Worksheet time: 50mins
Which protocol is primarily used for transferring web pages over the Internet?
FTP
HTTP
SMTP
IMAP
What does HTML stand for?
Hyperlinks and Text Markup Language
Hyper Text Markup Language
Hyper Tool Markup Language
Hyper Transfer Markup Language
Which of the following is not an Internet service?
File Transfer
Word Processor
Chat
Who is known as the father of the World Wide Web?
Bill Gates
Tim Berners-Lee
Vint Cerf
Larry Page
Which protocol is used for sending email?
SMTP
FTP
HTTP
SNMP
The main advantage of client-server computing is:
Reduced redundancy
Centralized resources
Faster manual calculations
Offline functionality
Which layer of the Internet protocol model is responsible for routing packets?
Application
Transport
Network
Data Link
Which of the following is a strategy for web development?
Planning
Design
Implementation
All of the above
Which of the following is not a protocol governing the web?
HTTP
FTP
HTML
HTTPS
The first website went online in which year?
1989
1991
1995
1998
A web project is usually documented using:
UML diagrams
Spreadsheets
Presentation slides
Flowcharts only
Which of the following is not an Internet tool?
Web Browser
Email Client
Database Server
FTP Client
Which service allows real-time online communication?
FTP
Telnet
Chat
SMTP
Connecting a computer to the Internet requires:
Modem or Router
Hard Disk
Printer
Scanner
Which of the following is an example of client-server architecture?
Peer-to-peer network
Web-based email service
Standalone desktop application
None of the above
Which of the following is true about DOM in XML?
Reads document sequentially
Loads entire document in memory
Cannot modify XML
Only works with HTML
The tag is used in HTML to:
Display images
Create forms and take input
Display tables
Style text
Which HTML tag is used to display a table cell?
<tr>
<td>
<table>
<th>
Which of the following is used for XML validation?
DTD
CSS
HTML
FTP
SAX parser in XML is:
Memory efficient
Loads entire XML in memory
Cannot parse large XML
Deprecated
What is the main difference between DOM and SAX?
DOM is event-driven, SAX loads entire document
DOM loads entire document, SAX is event-driven
DOM cannot modify XML
SAX cannot parse XML
Which tag is used to create an unordered list in HTML?
<ol>
<ul>
<li>
<list>
Which tag is used to define a table header?
<th>
<td>
<tr>
<table>
The tag in HTML is used to:
Add images
Create links
Collect user input
Define a table
Which HTML tag is used to create a frame?
<frame>
<iframe>
<frameset>
Both A & C
What does CSS stand for?
Computer Style Sheets
Creative Style Sheets
Cascading Style Sheets
Colorful Style Sheets
Which HTML tag is used to define an internal CSS?
<css>
<script>
<style>
<link>
Which property is used to change the background color of an element?
color
bgcolor
background-color
bg-color
What is the default position value of an HTML element?
absolute
relative
static
fixed
Which CSS property controls the text size?
text-style
font-size
font-weight
text-decoration
Which CSS property is used to make text bold?
font-weight
text-weight
font-style
font-variant
Which CSS property adds space inside the border of an element?
margin
padding
border-spacing
outline
What is the correct CSS syntax to select an element with id="header"?
.header
#header
header
*header
Which CSS property is used to control the space between lines of text?
line-height
text-spacing
spacing
text-height
Which CSS property is used to change the text color of an element?
color
text-color
font-color
text-style
Which property specifies the width and height of elements?
dimension
size
width & height
display-size
Which property allows you to hide overflow content of an element?
overflow: hidden
overflow: scroll
overflow: auto
overflow: visible
Which property is used to style links differently based on their state?
pseudo-class
attribute selector
grouping
class selector
Which CSS technique is used to combine multiple selectors to share styles?
Grouping
Nesting
Inheritance
Pseudo-class
Which property aligns an element vertically inside its container?
vertical-align
text-align
align
position
What is an element vertically inside its container?
vertical-align
text-align
align
position
Which of the following is a valid way to declare a JavaScript variable?
var x;
let x;
const x;
All of the above
Which symbol is used for single-line comments in JavaScript?
/* */
//
###
##
What is the correct syntax to write a function in JavaScript?
function myFunc() {}
func myFunc() {}
def myFunc() {}
function: myFunc() {}
Which JavaScript method is used to write text to the HTML document?
document.write()
document.output()
document.show()
document.print()
What does document.getElementById("demo") return?
The HTML element with id="demo"
The value of id="demo"
A CSS style of element demo
Undefined
Which of the following is used to submit a form without reloading the page?
JavaScript
AJAX
HTML
CSS
Which object represents the HTML document in JavaScript?
window
document
body
element
Which of these is not a JavaScript data type?
Boolean
Number
Float
String
How do you call a function named myFunction in JavaScript?
call myFunction();
myFunction();
call function myFunction();
execute myFunction();
Which event occurs when the user clicks on an HTML element?
onmouseover
onchange
onclick
onload
Which protocol ensures reliable data transmission?
UDP
TCP
IP
ICMP
Which of the following is a valid URL in Java?
http://www.example.com
ftp://ftp.example.com
file:///C:/example.txt
All of the above
Which method returns the content of a URL in Java?
URL.getContent()
URL.open()
URL.read()
URL.fetch()
Which method of InetAddress checks if a host is reachable?
isReachable()
checkHost()
ping()
reach()
Which protocol does ServerSocket use by default?
TCP
UDP
HTTP
IP
Which Java class is used to parse URLs?
URL
URI
Socket
InetAddress
Which method returns the port number of a socket?
getPort()
getSocketPort()
port()
getLocalPort()
Which method returns the local port of a server socket?
getPort()
getLocalPort()
getSocketPort()
getServerPort()
Which of the following is true about TCP sockets?
Connection-oriented
Reliable
Stream-based
All of the above
Which method returns the IP address as a string in InetAddress?
getHostAddress()
toString()
getIP()
getAddress()
What is the main purpose of JavaBeans in Java?
To store data only
To provide reusable software components
To create web pages
To manage database connections
Which method is automatically called when a JavaBean is initialized?
start()
init()
constructor
create()
Which of the following is not a feature of JavaBeans?
Serializable
No-argument constructor
Encapsulation using properties
Can extend multiple classes
What are JavaBeans properties accessed through?
Direct variable access
Getter and setter methods
Static methods only
Constructor arguments
Which of the following is a valid property type in JavaBeans?
Only primitive data types
Only object types
Any type including primitive and object
Only String
What is a key characteristic of a Stateful Session Bean?
Maintains client state across multiple method calls
Does not maintain client state
Only interacts with databases
Cannot be used in EJB
What is a key characteristic of a Stateless Session Bean?
Maintains state across multiple clients
Does not maintain any client-specific state
Only used for database entities
Can never be transactional
Which interface must a Stateless Session Bean implement?
SessionBean
EntityBean
MessageDrivenBean
None, just annotate with @Stateless
Entity Beans represent:
Business logic only
Persistent data stored in a database
Only transient objects
User interface components
Which annotation is used to define a Stateless Session Bean in EJB 3.0+?
@Stateful
@Stateless
@Entity
@EJB
Node.js is built on which JavaScript engine?
V8 Engine
SpiderMonkey
Chakra
Rhino
Node.js is primarily used for developing ______ applications.
Desktop
Server-side
Mobile
Gaming
Which command is used to check Node.js version?
node version
node --check
node -v
version node
REPL stands for:
Read–Execute–Print–Loop
Read–Evaluate–Print–Loop
Run–Execute–Process–Loop
Read–Event–Process–L
Which of the following is not an implicit object in jsp?
exception
date
out
context
Default value of autoFlush attribute is?
8kb
16kb
true
false
Which one is the correct order of phases in JSP life cycle?
Initialization, Cleanup, Compilation, Execution
Initialization, Compilation, Cleanup, Execution
Compilation, Initialization, Execution, Cleanup
Cleanup, Compilation, Initialization, Execution
Which tag should be used to pass information from JSP to included JSP?
Using <%jsp:page> tag
Using <%jsp:param> tag
Using <%jsp:import> tag
Using <%jsp:useBean> tag
Application is instance of which class?
javax.servlet.Application
javax.servlet.HttpContext
javax.servlet.Context
javax.servlet.ServletContext
“request” is instance of which one of the following classes
Request
HttpRequest
HttpServletRequest
ServletRequest
pageContext object is an instance of ____
javax.servlet.jsp.PageContext
javax.servlet.jsp.Page
javax.servlet.jsp.Context
java.servlet.jsp.PageContext
<%
int id =99;
String desig = "Manager";
%>
Which of the given options best describes the above code.
not a valid code
id, desig variable are included in _jsp service() method
id, desig variables are included in jspInit() method
None
Which of the following is not an action tag in jsp?
<jsp:useBean>
<jsp:param>
<jsp:forward>
<jsp:import>
Servlet runs each request in a __________ ?
OS shell
JVM
JRE
Separate thread
Which of the following statement is not correct about HTTP method ?
A GET request append data to the end of the URL.
A POST request append data to the end of the URL.
HTTP DELETE method request for the Server to delete the resource
HTTP OPTIONS request for communication options available on the request/response chain
Which class provide implementation for service() method ?
HttpServlet
GenericServlet
Servlet
none of the above
_________ is responsible for managing execution of servlet
Web Container
JVM
Servlet Context
Server
The _______ specification defines an application programming interface for communication between the server and the application program
Java Servlet
java jdbc
java applet
java swing
What is the lifecycle of a servlet?
Servlet class is loaded
Servlet instance is created
init(),service() and destroy() methods will be called
All the above
How many times init() method is called during life time of a servlet?
two times
one time
several times
never called
When destroy method() of servlet called ?
for first request
when you close the browser window
when you remove the application from server
none of the above
where can you keep .java files in webapplication(Servlets)?
root directory
WEB-INF
src
classes
web.xml is also called as --------------------
data directory
deployment descriptor
directroy descriptor
none of the above
Where to place user defined webapplications in webserver (Apache Tomcat)
in bin directory
in lib directory
webapps directory
work directory
Which of the following is true about HTTP Get method?
A - The GET method sends the encoded user information appended to the page request.
B - The GET method is the defualt method to pass information from browser to web server.
C - Both of the above.
D - None of the above.
