Previous year paper

THEORY EXAMINATION (SEM–IV) 2016-17 WEB TECHNOLOGY

General B.Tech 0 downloads

About this previous year paper

SECTION A – Basic Concepts of Web Technology

Section A contains short conceptual questions related to HTML, ASP, CSS, web servers, client-side scripting, and HTTP requests. 

WEB-TECHNOLOGY-EIT401

Question (a): Write a Simple HTML Document that Contains a Selectable Link

Answer:

 

<!DOCTYPE html>
<html>
<head>
<title>Simple HTML Link</title>
</head>
<body>

<h2>Welcome to My Webpage</h2>
<p>Click the link below to visit Google:</p>

<a href="https://www.google.com">Visit Google</a>

</body>
</html>

 

This HTML document contains a hyperlink using the <a> (anchor) tag. When the user clicks the link, it opens the specified webpage.

Question (b): What is a Session? How is it Handled in ASP?

Answer:
A session is a mechanism used to maintain user-specific information across multiple web pages during a user's interaction with a website.

Since HTTP is a stateless protocol, session management helps store user data such as login information, preferences, or shopping cart items.

In ASP (Active Server Pages), sessions are handled using the Session object, which stores data for a specific user session.

Example:

 

<%
Session("username") = "Pratik"
Response.Write("Welcome " & Session("username"))
%>

 

The session object keeps data until the session expires or the user logs out.

Question (c): Properties of Java Beans

Answer:
Java Beans are reusable software components written in Java. They are used to create modular applications.

Key properties of Java Beans include:

They must have a public default constructor.

Properties are accessed using getter and setter methods.

They are serializable, allowing them to be saved and restored.

They support event handling.

They follow naming conventions for methods.

Java Beans help in building reusable and modular applications.

Question (d): What is Dynamic HTML?

Answer:
Dynamic HTML (DHTML) refers to a combination of technologies used to create interactive and dynamic web pages.

DHTML uses:

HTML

CSS

JavaScript

DOM (Document Object Model)

With DHTML, webpage content can change without reloading the page. For example, menus, animations, and interactive elements are created using DHTML.

Question (e): Difference Between Web Server and Web Browser

FeatureWeb ServerWeb Browser
DefinitionSoftware that stores and delivers web pagesSoftware used to access and display web pages
FunctionHandles client requestsDisplays website content
ExamplesApache, Nginx, IISChrome, Firefox, Edge

A browser sends requests to the server, and the server responds by sending web pages.

Question (f): Relationship Between Static and Dynamic Web Pages

Answer:
A static web page displays fixed content that does not change unless manually updated.

A dynamic web page generates content dynamically based on user interaction or database data.

Active web pages combine both static and dynamic elements to create interactive user experiences.

For example, an e-commerce website dynamically shows product details based on user searches.

Question (g): ASP Code for User Authentication

Answer:

 

<%
username = Request.Form("username")
password = Request.Form("password")

if username="admin" and password="1234" then
Response.Write("Login Successful")
else
Response.Write("Invalid Username or Password")
end if
%>

 

This ASP code checks user credentials and authenticates users based on provided information.

Question (h): What is CSS?

Answer:
CSS (Cascading Style Sheets) is a style sheet language used to control the appearance of web pages.

It allows developers to define styles for HTML elements such as colors, fonts, layout, and spacing.

Example:

 

body {
  background-color: lightblue;
}

h1 {
  color: red;
}

 

CSS separates content from design, making websites easier to maintain.

Question (i): Difference Between GET and POST Requests

FeatureGETPOST
Data locationSent in URLSent in request body
SecurityLess secureMore secure
Data lengthLimitedNo major limit
UseFetch dataSend data to server

POST is commonly used in login forms and data submissions.

Question (j): Need for Client-Side Scripting

Answer:
Client-side scripting allows web pages to execute scripts on the user's browser instead of the server.

Benefits include:

Faster response time

Reduced server load

Improved user interaction

Languages used for client-side scripting include JavaScript and VBScript.

Examples include form validation and interactive webpage features.

SECTION B – Intermediate Concepts of Web Technology

Section B includes questions related to JSP, Java programming, XML, AJAX, Servlets, and exception handling. 

WEB-TECHNOLOGY-EIT401

Question: JSP Page and Include Directives

Page directive provides instructions to the JSP container about the page.

Example:

 

<%@ page language="java" contentType="text/html" %>

 

Include directive is used to include another file within the JSP page.

Example:

 

<%@ include file="header.jsp" %>

 

These directives help organize and manage JSP pages.

Question: Java Program to Sort an Array Without API Methods

 

public class SortArray {
    public static void main(String[] args) {
        int arr[] = {5,2,8,1,3};
        
        for(int i=0;i<arr.length;i++){
            for(int j=i+1;j<arr.length;j++){
                if(arr[i]>arr[j]){
                    int temp=arr[i];
                    arr[i]=arr[j];
                    arr[j]=temp;
                }
            }
        }

        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]+" ");
        }
    }
}

 

This program sorts an integer array using a simple comparison method.

Question: Exception Handling in Java

Exception handling is used to handle runtime errors in Java programs.

The main components include:

try block

catch block

finally block

throw and throws keywords

Example:

 

try {
int a = 10/0;
}
catch(Exception e) {
System.out.println("Error occurred");
}

 

Exception handling prevents program crashes.

Question: What is AJAX?

AJAX stands for Asynchronous JavaScript and XML.

It allows web pages to update data without refreshing the entire page.

Applications of AJAX include:

Live search suggestions

Chat applications

Online forms

Interactive dashboards

AJAX improves user experience and website responsiveness.

SECTION C – Advanced Web Technology Concepts

Section C questions require deeper understanding of ASP vs JSP, XML schema, JavaScript arrays, JDBC, DOM, and EJB. 

WEB-TECHNOLOGY-EIT401

Question: Difference Between ASP and JSP

FeatureASPJSP
LanguageVBScript or .NETJava
PlatformMicrosoftPlatform independent
PerformanceModerateHigh
IntegrationWorks with IISWorks with Java servers

JSP is generally preferred because it supports Java’s powerful features.

Question: XML Schema Example

XML schema defines the structure of an XML document.

Example:

 

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="student">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="branch" type="xs:string"/>
      <xs:element name="rollno" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

</xs:schema>

 

XML schema helps validate XML documents.

Question: JavaScript Array Creation

Arrays in JavaScript can store multiple values.

Example:

 

var fruits = ["Apple","Banana","Mango"];

for(var i=0;i<fruits.length;i++){
console.log(fruits[i]);
}

 

Arrays help manage collections of data in web applications.

Question: JDBC Components

JDBC (Java Database Connectivity) allows Java programs to connect with databases.

Main components include:

JDBC Driver

Connection

Statement

ResultSet

These components help perform database operations such as inserting, updating, and retrieving data.

Conclusion

Web Technology combines multiple technologies such as HTML, CSS, JavaScript, ASP, JSP, XML, and databases to create dynamic web applications. Understanding these technologies helps developers build interactive and efficient websites.

TypePrevious year paper
SubjectGeneral
Board / courseB.Tech
FilePDF · 73.26 KB
Shared by SuGanta International

Added by the SuGanta team.