IWT End Semester Assets
IWT End Semester Assets
Unit 1 –
Unit 5 –
.2
i. Differentiate between Intranet and Internet. (3 marks)
• Intranet (1 mark): It is a private network within an organization.
• Internet (1 mark): It is a global network connecting millions of public and private
networks.
ii. Functionalities provided by Application Server (6 marks)
1. Servlet and JSP Support (1 mark): Handles Java servlets and JavaServer Pages.
2. Transaction Management (1 mark): Manages transactions in database operations.
3. Security (1 mark): Provides security features like authentication and authorization.
4. Database Connection Pooling (1 mark): Manages a pool of database connections for
efficient use.
5. Load Balancing (1 mark): Distributes incoming network traffic across multiple servers.
6. Concurrency Control (1 mark): Manages concurrent access to shared resources.
At least two Application Servers (2 marks)
1. Apache Tomcat (1 mark)
2. WildFly (1 mark)
OR iii. Describe the Hierarchy of Domain Name Servers (8 marks)
• TLD (2 marks): Top-Level Domain servers, e.g., ".com", ".org".
• Root (2 marks): The highest level of the DNS hierarchy.
• Name Servers (3 marks): Servers that store DNS records for a domain.
• Example (1 mark): Example.com as an illustration.
Q.3
i. Explain Document Object Model with an example (3 marks)
• Document Object Model (2 marks): Represents a structured document as a tree of
objects.
• Example (1 mark): Demonstrates manipulating HTML elements using JavaScript.
ii. Steps for Website Planning (7 marks)
1. Define Purpose (1 mark): Clarify the website's goals.
2. Identify Target Audience (1 mark): Know the intended users.
3. Plan Content (1 mark): Decide on the information to be presented.
4. Organize Content (1 mark): Structure content logically.
5. Design Navigation (1 mark): Plan how users will navigate the site.
6. Choose Technology (1 mark): Decide on tools and frameworks.
7. Test and Launch (1 mark): Ensure functionality and deploy.
OR iii. "List" Tag (7 marks)
• List Tag (2 marks): Used to create a list.
• Types of Lists with Example (5 marks): Ordered list <ol>, unordered list <ul>, definition
list <dl> with examples.
Q.4
i. XML Proves to be the Base for Web Technologies (4 marks)
• Structured Data (2 marks): XML provides a structured format for data representation.
• Interoperability (2 marks): Allows seamless data exchange between different systems.
ii. CSS (3 marks)
• Cascading Style Sheets (1 mark): Used for styling HTML elements.
• XSL (3 marks): Extensible Stylesheet Language used for transforming XML.
OR iii. Scenario to Justify the Need of XML Transformation (6 marks)
• Data Integration (2 marks): XML transformation facilitates integrating data from diverse
sources.
• Standardization (2 marks): Allows standardizing data format for consistency.
• Cross-platform Communication (2 marks): XML transforms enable communication
between systems with different data formats.
Q.5
i. Javax-servlet.jar (4 marks)
• Javax-servlet.jar (2 marks): It's a Java Archive file containing servlet-related classes.
• Interfaces of javax.servlet package (2 marks): Include Servlet, ServletConfig,
ServletContext, etc.
ii. PHP Program to Specify Age of Every Student (6 marks)
<?php
$studentAges = array("John" => 20, "Mary" => 22, "Bob" => 21);
2019-
Q.2
i. What is DNS? How does it function? (2 marks)
• DNS Definition (1 mark): DNS stands for Domain Name System, it translates human-
readable domain names into IP addresses.
• Function (1 mark): DNS functions as a distributed database that resolves domain names
to IP addresses, allowing computers to locate each other on the internet.
ii. Basic Structure of HTTP Request and Response Message Structure (3 marks)
HTTP Request:
• Request Line (1 mark): GET /path/resource HTTP/1.1
• Headers (1 mark): Host, User-Agent, etc.
• Body (0.5 marks): Optional data sent with the request.
HTTP Response:
• Status Line (1 mark): HTTP/1.1 200 OK
• Headers (1 mark): Content-Type, Content-Length, etc.
• Body (0.5 marks): Data sent as a response.
iii. Functions of Web Browser and Server Communication (5 marks)
• Web Browser Functions (3 marks):
1. Rendering (1 mark): Displaying HTML, CSS, and JavaScript content.
2. User Interface (1 mark): Providing an interface for user interaction.
3. Data Storage (1 mark): Storing cookies, local storage.
• Server Communication Functions (2 marks):
1. Request Sending (1 mark): Initiating requests to servers.
2. Response Handling (1 mark): Processing and rendering server responses.
OR iv. Architecture of WWW (5 marks)
• Diagram (2 marks): Illustrating components like clients, servers, browsers.
• Explanation (3 marks): Detailing the interaction between clients and servers in the
World Wide Web.
Q.3
i. Define Document Object Model (2 marks)
• Document Object Model (2 marks): It's a programming interface for web documents. It
represents the document as a tree of objects.
ii. HTML Text Formatting Tags with Examples (8 marks)
1. Bold (2 marks): <b>...</b>
2. Italic (2 marks): <i>...</i>
3. Underline (2 marks): <u>...</u>
4. Strike-through (2 marks): <s>...</s>
OR iii. JavaScript Program to Find Largest Among 5 Numbers (8 marks)
var numbers = [5, 8, 2, 10, 3];
var max = Math.max(...numbers);
console.log("The largest number is: " + max);
Q.4
i. XSLT is Important for XML (2 marks)
• XSLT Importance (2 marks): XSLT (Extensible Stylesheet Language Transformations) is
crucial for transforming XML documents into different formats, aiding in presentation
and data exchange.
ii. Three Rules for Writing XML (3 marks)
1. Well-Formed Structure (1 mark): Elements must be properly nested, and tags closed
correctly.
2. Valid Document (1 mark): Follow a defined DTD or XML Schema.
3. Reserved Characters (1 mark): Special characters like <, >, & should be escaped or used
within CDATA sections.
iii. Define DTD, Explain Various Types of DTD (5 marks)
• Definition of DTD (1 mark): Document Type Definition specifies the structure of an XML
document.
• Various Types of DTD (4 marks):
1. Internal DTD (1 mark): DTD defined within the XML document.
2. External DTD (1 mark): DTD defined in a separate file.
3. Parameter Entity (1 mark): Reusable entity declarations.
4. General Entity (1 mark): Represents general text.
OR iv. XML Processing Model with Example (5 marks)
• XML Processing Model (3 marks): Illustrate how XML documents are processed from
parsing to data extraction.
• Example (2 marks): Showing a simple XML document and how data can be extracted
using XPath.
Q.5 (Choose any two)
i. PHP Program to Print Factorial of Any Number (5 marks)
<?php
function factorial($n) {
if ($n === 0 || $n === 1) {
return 1;
} else {
return $n * factorial($n - 1);
}
}
$number = 5;
echo "Factorial of $number is: " . factorial($number);
?>
ii. PHP Program to Find Whether a Number is Armstrong or Not (5 marks)
<?php
function isArmstrong($num) {
$originalNum = $num;
$sum = 0;
$n = strlen($num);
while ($num != 0) {
$digit = $num % 10;
$sum += pow($digit, $n);
$num /= 10;
}
$number = 153;
echo ($number . " is " . (isArmstrong($number) ? "an Armstrong number" : "not an Armstrong
number"));
?>
iii. Briefly Explain Life Cycle of Servlet (5 marks)
• Diagram (2.5 marks): Illustrating phases like initialization, service, and destruction.
• Description (2.5 marks): Detailing each phase's purpose and activities.
Q.6 (Choose any two)
i. Explain AngularJS Boot Process (5 marks)
• Initialize (1.5 marks): Initialization phase, module loading.
• Execution (2 marks): Execution phase, compilation of HTML.
• Calling (1.5 marks): AngularJS calls functions as required.
ii. Explain Lifecycle of a JSP (5 marks)
• Diagram (2 marks): Representing phases like translation, compilation, and execution.
• Explanation (3 marks): Describing each phase's role and activities.
iii. Explain Any Five Attributes of Page Directive (5 marks)
1. Language (1 mark): Specifies the scripting language used in the JSP page.
2. ContentType (1 mark): Defines the MIME type of the response.
3. Session (1 mark): Controls session behavior for the page.
4. Buffer (1 mark): Sets the buffer size for the page.
5. AutoFlush (1 mark): Specifies whether to flush the buffer automatically.
2022-
Q.2
i. Define WWW (3 marks)
• Definition (3 marks): The World Wide Web (WWW) is a system of interlinked hypertext
documents accessed via the internet. It allows users to view and navigate text,
multimedia, and other content through web browsers.
ii. Description Along With Diagram of HTTP Request and Response Protocol (7 marks)
• Diagram (HTTP Request and Response Protocol) (1.5 marks): Illustrating components
like Request Line, Headers, and Body in both HTTP Request and Response.
• Get Methods (1.5 marks): Brief explanation and example.
• Post Methods (1.5 marks): Brief explanation and example.
• Examples (1 mark): Providing practical examples of GET and POST methods.
OR iii. Differentiate Between Web Servers and Application Servers (7 marks)
• Purpose (1 mark): Web servers serve web pages, while application servers handle
application logic.
• Usefulness (1 mark): Web servers are for static content, while application servers
process dynamic content.
• Resource Consumption (1 mark): Application servers typically consume more resources
due to application processing.
• Target Environment (1 mark): Web servers focus on serving content to clients, while
application servers handle application-specific tasks.
• Multithreading Support (1 mark): Application servers often support multithreading for
concurrent requests.
• Protocols Supported (1 mark): Both support HTTP, but application servers may handle
additional protocols.
• Example (1 mark): Apache HTTP Server as a web server, and Tomcat as an application
server.
Q.3
i. DOM in HTML (As per the explanation) (2 marks)
• DOM in HTML (2 marks): Document Object Model represents the structured document
as a tree of objects in HTML.
ii. Write DTD for the Given XML Code (3 marks)
xmlCopy code
<?xml version="1.0"?> <!DOCTYPE note [ <!ELEMENT note (to, from, heading, body)>
<!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)> ]>
OR iii. HTML List and Tables (5 marks)
• HTML List (2.5 marks): Showing usage of <ul> and <li> for an unordered list.
• HTML Tables (2.5 marks): Demonstrating the structure of an HTML table.
OR iv. Rules to Declare Variable in JavaScript and Types of JavaScript Data Types (5 marks)
• Rules to Declare Variable in JavaScript (2.5 marks): Examples: var, let, const.
• Types of JavaScript Data Types (2.5 marks): Examples: Number, String, Boolean, Object.
Q.4
i. Three Main Components of XSL (1 mark each) (3 marks)
1. XSLT (Transformation)
2. XPath (Navigation)
3. XSL-FO (Formatting Objects)
ii. CSS, Advantages, and Disadvantages of Displaying XML Using CSS (7 marks)
• CSS (1 mark): Cascading Style Sheets for styling XML documents.
• Advantages (3 marks):
1. Separation of Concerns (1 mark): Separates content from presentation.
2. Consistency (1 mark): Maintains consistent styling across documents.
3. Reusability (1 mark): Styles can be reused across multiple documents.
• Disadvantages (3 marks):
1. Browser Compatibility (1 mark): May not display consistently across all
browsers.
2. Limited Layout Control (1 mark): Limited compared to other layout methods.
3. Complexity (1 mark): May become complex for intricate designs.
OR iii. XML, Difference from HTML, and Complimenting Each Other (7 marks)
• XML (2 marks): Extensible Markup Language, designed for data interchange.
• Difference from HTML (3 marks): Focus on data structure, not presentation;
extensibility.
• Complimenting Each Other (2 marks): XML provides structure, while HTML provides
presentation.
Q.5
i. Draw and Explain Lifecycle of Servlet (As per the explanation) (4 marks)
• Diagram (As per the explanation) (2 marks): Representing phases like initialization,
service, and destruction.
• Explanation (As per the explanation) (2 marks): Detailing each phase's purpose and
activities.
ii. Role of Cookies and Its Creation (As per the explanation) (6 marks)
• Role of Cookies (3 marks): Storing user information, tracking sessions, personalization.
• Creation (3 marks): Setting cookies using the Set-Cookie header in the HTTP response.
OR iii. Features of PHP (6 marks)
• Server-Side Scripting (1 mark): Executes on the server to generate dynamic content.
• Open Source (1 mark): Freely available with a large community.
• Database Support (1 mark): Provides support for various databases.
• Platform Independence (1 mark): Works on multiple platforms.
• Security (1 mark): Offers security features.
• Extensibility (1 mark): Supports extensions and custom modules.
Q.6 (Choose Any Two)
i. JSP (As per the explanation) (5 marks)
• Explanation (As per the explanation): Describing JavaServer Pages and their role in
dynamic web content.
ii. JDBC (As per the explanation) (5 marks)
• Explanation (As per the explanation): Detailing the Java Database Connectivity API and
its use in connecting Java applications to databases.
iii. MVC Framework (As per the explanation) (5 marks)
• Explanation (As per the explanation): Describing the Model-View-Controller framework
and its role in software architecture.
Life Cycle of servlet-
Web server is useful or fitted for static Application server is fitted for dynamic
2. content. content.
Web servers arrange the run Application servers arrange the run
4. environment for web applications. environment for enterprise applications.
Web server’s capacity is lower than the Application server’s capacity is higher than
6. application server. the web server.
In web servers, HTML and HTTP In application servers, GUI as well as HTTP
7. protocols are used. and RPC/RMI protocols are used.
S.NO Web Server Application Server
Processes that are not resource-intensive Processes that are resource-intensive are
8. are supported. supported.
Transactions and connection pooling are Transactions and connection pooling are
9. not supported. supported.
The capacity of fault tolerance is low Application servers have high fault
10. compared to application servers. tolerance.
Servlet plays a controller role in JSP is the view in the MVC approach
MVC Role the MVC approach. for showing output.
Feature Servlet JSP
service() Method In Servlet, we can override the In JSP, we cannot override its service()
Override service() method. method.
Data Processing Servlet can handle extensive data JSP cannot handle extensive data
Capability processing. processing very efficiently.
Servlets do not have the facility JSP has the facility for writing custom
Custom Tags for writing custom tags. tags.