Web Technologies Laboratory Manual
Web Technologies Laboratory Manual
(AUTONOMOUS)
Affiliated to JNTUH, approved by AICTE, Accredited by NAAC with A++ Grade
ISO 9001:2015 Certified
Kacharam, Shamshabad, Hyderabad – 501218, Telangana, India
Laboratory Manual
WEB TECHNOLOGIES
LABORATORY
(II B. Tech- II SEMESTER)
(VCE-R22)
Course Code-A8605
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
COURSE OBJECTIVE
The course enables the learner to apply various web technologies for developing static and dynamic web
pages; as well it gives immense knowledge to work in Full Stack Development.
PO11
PO12
PSO1
PSO2
PO1
PO2
PO3
PO4
PO5
PO6
PO7
PO8
PO9
POs
A8605.1 3 3 2 2
A8605.2 3 3 2 2
A8605.3 2 3 2 2
A8605.4 3 3 3 3
A8605.5 3 3 3 3
Note: 1-Low, 2-Medium, 3-High
LIST OF PROGRAMS FOR PRACTICE:
N Tools and Expected
Title of the Experiment
o Techniques Skills/Ability
Design a static web page, the page Open-
consists of a table with set of links to source: Java
Identify basic HTML
products available in an online Toolkit:
tags such as list,
mobile store. Each product link has a JDK8 and
1 table, images, video,
separate web page to describe above
link and text format
product information like image, versions.
to create a web page.
features as a list, and a short video to OS: Windows
demonstrate product. / Linux
Design a home page with nested Web
frames consisting of 3 parts. A title Browser:
frame describing organization name Internet
Identify the need of
(Frame-1), index frame with links to Explorer/Goo
designing a web page
2 access data (Frame-2) and linked web gle
to display multiple
pages display in content frame Chrome/Moz
web pages.
(Frame-3). Use inline, embedded and illa Firefox
external styles for web pages in IDE: VS Code
appropriate way. Server:
Design a Job registration form for an XAMPP, Identify the basic
organization using HTML form Tomcat input fields required
controls to accept personal to create a form and
information like name, gender, process it, as well
languages known, email, contact validate the fields
number and address for using JavaScript.
3
communication. The form provides a
list to choose job location, an area to
describe about the applicant, an
option to upload CV and a button to
clear the controls and submit end
user form.
Design a HTML form of a bank to
accept a form from a customer to
enter name, occupation, loan
4 amount, rate of interest and tenure
in years. After submission of the form
calculate and display the EMI
information.
5 Use the Job Registration form and
validate the fields name, email and
contact number using appropriate
regular expressions. If the form is
N Tools and Expected
Title of the Experiment
o Techniques Skills/Ability
valid user gets “Registered
Successfully “, otherwise provide
appropriate error message to user.
Max. Marks
[Link]# EVALUATION METHOD ASSESSMENT TOOL
Marks Total
A write-up on day-to-
day experiment in the 10
laboratory
Viva-voce (or) tutorial
(or) case study (or)
application (or) poster 10
presentation of the
Continuous Internal
course
Evaluation (CIE)
1 Internal practical 40
10
examination
Laboratory Project,
which consists of the
Design (or) Software /
Hardware Model 10
Presentation (or) App
Develop (or) Prototype
Presentation
Write-up 10
Experiment/program 15
Semester End Evaluation of results 15
2 60
Examination (SEE) Presentation on another
10
experiment/program
Viva-Voce 10
LAB SESSION PLAN
CO BLO
OM’s
No Title of the Experiment
LEVE
L
Design a static web page, the page consists of a table CO-1 L-3
with set of links to products available in an online
1 mobile store. Each product link has a separate web page
to describe product information like image, features as
a list, and a short video to demonstrate product.
Design a home page with nested frames consisting of 3 CO-1 L-3
parts. A title frame describing organization name
(Frame-1), index frame with links to access data (Frame-
2
2) and linked web pages display in content frame
(Frame-3). Use inline, embedded and external styles for
web pages in appropriate way.
Design a Job registration form for an organization using CO-1 L-3
HTML form controls to accept personal information like
name, gender, languages known, email, contact number
and address for communication. The form provides a list
3
to choose job location, an area to
describe about the applicant, an option to upload CV
and a button to clear the controls and submit end user
form.
Design a HTML form of a bank to accept a form from a CO-1 L-3
customer to enter name, occupation, loan amount, rate
4
of interest and tenure in years. After submission of the
form calculate and display the EMI information.
5 Use the Job Registration form and validate the fields CO-1 L-3
CO BLO
OM’s
No Title of the Experiment
LEVE
L
name, email and contact number using appropriate
regular expressions. If the form is valid user gets
“Registered Successfully “, otherwise provide
appropriate error message to user.
1. What is HTML?
2. Write the Structure of an HTML program?
Pre-Lab
3. What are elements of an HTML program?
Questions 4. What is the difference between web page and a web site?
5. List out the various text formatted tags?
Program Code:
<html>
<body style=background-color: lightgreen>
<h1 align="center">MOBILE STORE</h1>
<table border="5" cellspacing="2" align="center">
<tr align="center">
<td><b>[Link]</b></td>
<td><b>PRODUCT</b></td>
<td><b>IMAGE</b></td>
<td><b>PRODUCT INFO</b></td>
<td><b>FEATURES</b></td>
<td><b>VIDEO</b></td>
</tr>
<tr align="center">
<td><b>1</b></td>
<td>Samsung Galaxy S22 5G</td>
<td><img src="[Link]" alt="" width="100" height="100"/></td>
<td><ol>
<li>Phantom White</li>
<li>8GB RAM</li>
<li>128GB Storage</li>
</ol></td>
<td><a href="[Link]">About this item</a></td>
<td><a href="[Link]
</tr>
<tr align="center">
<td><b>2</b></td>
<td>Redmi 12C</td>
<td><img src="[Link]" alt="" width="100" height="100"/></td>
<td><ol>
<li>MIUI 13, Android 12.0</li>
<li>64 GB</li>
<li>128GB Storage</li>
</ol></td>
<td><a href="[Link]">About this item</a></td>
<td><a href="[Link]
</tr>
</table>
</body>
</html>
Program Code:
[Link]
<html>
<head>
<title>Home</title>
</head>
<frameset rows="5%,*">
<frame src="[Link]">
<frameset cols="25%,*">
<frame src="[Link]" name="f2">
<frame src="[Link]" name="f3">
</frameset>
</html>
[Link]
<html>
<head><title>frame1</title>
</head>
<body bgcolor="blue">
<h1 style="[Link];font-size:15pt">
<marquee bgcolor="#cccccc" loop="-1" scrollamount="6" width="100%">
VARDHAMAN COLLEGE OF ENGINEERING </marquee>
</h1>
</body>
</html>
[Link]
<html>
<head><title>frame2</title>
<style type="text/css">
h1
{
font-size:25pt;color:pink
}
</style>
</head>
<body bgcolor="red">
<h1>click the link</h1>
<a href="[Link]" target=f3>Introduction</a><br>
<a href="[Link]" target=f3>Departments</a><br>
<a href="[Link]" target=f3>Address</a><br>
<a href="[Link]" target=f3>Feedback</a><br>
<a href="[Link]" target=f3>Gallery</a><br>
</body>
</html>
[Link]
<html>
<head><title>1st page</title>
<link rel="stylesheet" type="text/css" href="[Link]"/>
</head>
<body bgcolor="tan" align="center">
<h1><center>VARDHAMAN COLLEGE OF ENGINEERING</h1>
<h2>An Autonomous Institution, Affiliated to JNTUH & Approved by AICTE</h2>
<h3>Accredited by NAAC with A++ Grade</h3></center>
</body>
</html>
[Link]
<html>
<head><title>intro</title>
</head>
<body bgcolor="lightgreen">
<font color=black>
<p>
The college is surrounded by the green and beautiful landscape that will make your stay pleasant and
comfortable. VCE enjoys the geographical advantage as it is well connected by air, rail, and road. The
Hyderabad international airport at Shamshabad is just a 30-minute drive, and the college campus is close
to Bangalore highway (NH-7) making it accessible to several important centres in and around the city. A
ten-minute drive from the college campus reaches out to the outer ring road that connects Shamshabad
airport to the city. The residential campus, quiet and serene ambience are meant to provide you with a
perfect environment that is conducive to learn your chosen Engineering course.<br> On the academic
front, we have provided the best quality class rooms, laboratories, and library facilities. We have taken
utmost care while recruiting the faculty and staff. The campus boasts well-furnished hostel, sports
ground, gymkhana, guest-house for parents and visitors, large auditorium, bank, canteen, first-aid, and an
open theatre. <br>
The discipline and time-bound life-style is emphasized in the campus. We have provided 24-hour internet
access for enjoyable learning experience. During the course of your four-year degree programme, it will
be our sincere endeavour to ensure that your overall personality undergoes positive transformation
through special guest lectures on varied subjects by eminent personalities, visits to industries in the
vicinity, movie screening, and regular interaction with the principal and faculty of the college. </p>
</font>
</body>
</html>
[Link]
<html>
<head><title>Departments</title>
</head>
<body>
<div align="center">
<table border=2>
<tr>
<th>Dept code</th>
<th>Dept name</th>
</tr>
<tr>
<td>05</td>
<td>CSE</td>
</tr>
<tr>
<td>02</td>
<td>ECE</td>
</tr>
<tr>
<td>03</td>
<td>EEE</td>
</tr>
<tr>
<td>04</td>
<td>IT</td>
</tr>
<tr>
<td>05</td>
<td>MECH</td>
</tr>
<tr>
<td>06</td>
<td>AERO</td>
</tr>
</table>
</div>
</body> </html>
[Link]
<html>
<head><title>ADDRESS</title>
</head>
<body bgcolor="black">
<p>
<font color=red>
Shamshabad, <br>
Narkhuda, <br>
Telangana 501218<br>
Contact No: +91 8688901557<br>
Website: [Link]<br>
</font>
</p>
</body>
</html>
[Link]
<html>
<head><title>feed</title>
</head>
<body bgcolor="lightgreen">
<p>
<font color=green>
To give your feedback mail to info@[Link]
</font>
</p>
</body>
</html>
[Link]
<html>
<head><title>gall</title>
</head>
<body bgcolor="pink">
<p>
<font color=blue>
College Front View</font>
</p>
<img src="[Link]" height="200" width="200"/>
<img src="[Link]" height="200" width="200"/>
<img src="[Link]" height="200" width="200"/>
</body>
</html>
[Link]
<html>
<body style="background-color:blue">
<h2>Successfully applied</h2>
</html>
Program Code:
<!DOCTYPE html>
<html>
<head>
<title>SBI Loan EMI Calculator</title>
<style>
input[type=number]
{
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
background-color: #f8f8f8;
font-size: 16px;
}
input[type=submit]
{
background-color: #4CAF50;
color: white; padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
h2
{
text-align: center;
font-size: 28px;
margin-bottom: 20px;
}
</style>
<script>
function calculateEMI()
{
var loanAmount = [Link]("loan-amount").value;
var interestRate = [Link]("interest-rate").value;
var loanTenure = [Link]("loan-tenure").value;
var monthlyInterestRate = interestRate / (12 * 100);
var numberOfPayments = loanTenure * 12;
var emi = (loanAmount * monthlyInterestRate * [Link](1 + monthlyInterestRate,
numberOfPayments)) / ([Link](1 + monthlyInterestRate, numberOfPayments) – 1);
var emiText = "Your monthly EMI is Rs. " + [Link](2);
[Link]("emi-result").innerHTML = emiText;
[Link](emiText);
</script>
</head>
<body>
<h2>SBI Loan EMI Calculator</h2> <div>
<label for="loan-amount">Loan Amount</label>
<input type="number" id="loan-amount" name="loan-amount"
placeholder="Enter loan amount in Rs.">
<label for="interest-rate">Interest Rate</label>
<input type="number" id="interest-rate" name="interest-rate" placeholder="Enter interest rate in %">
<label for="loan-tenure">Loan Tenure</label>
<input type="number" id="loan-tenure" name="loan-tenure" placeholder="Enter loan tenure in
years">
<input type="submit" value="Calculate EMI" onclick="calculateEMI ()">
<p id="emi-result"></p>
</div>
</body></html>
Program Code:
<html>
<head>
<title>User Validation</title>
<style>
legend {
display: block;
padding-left: 2px;
padding-right: 2px;
border: none;
}
</style>
<script type="text/javascript">
function validate() {
var fn=[Link]("fn");
var fname=[Link];
var ln=[Link]("ln");
var lname=[Link];
var un=[Link]("un");
var uname=[Link];
var pwd=[Link]("pwd");
var pass=[Link];
var cpwd=[Link]("cpwd");
var cpass=[Link];
var em = [Link]("e");
var email = [Link];
var m=[Link]("ph");
var mobile=[Link];
var fre=/^[A-Za-z]+$/
var lre=/^[A-Za-z]+$/
var unre=/^[a-zA-Z]+[0-9a-zA-Z._]*$/
var ere=/^[a-zA-Z]+([\._]?\w+)*@\w+([\._]?\w+)*(\.\w{2,3})+$/
var mre=/^[6-9][0-9]{9}$/;
var pwdre=/^(?=.{8,})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$/
if ([Link](fname)) {
if([Link](lname))
{
if([Link](uname)){
if([Link](email))
{
if([Link](pass))
{
if (cpass==pass)
{
if([Link](mobile))
{
alert("done");
return true;
}
else
{
alert("Invalid");
[Link] = "red solid 3px";
[Link]='';
[Link]="Invalid";
return false;
}
}
else {
alert("Invalid");
[Link] = "red solid 3px";
[Link]='';
[Link]="Invalid";
return false;
}
}
else
{alert("Invalid");
[Link] = "red solid 3px";
[Link]='';
[Link]="Invalid";
return false;
}
}
else {
alert("Invalid");
[Link] = "red solid 3px";
[Link]='';
[Link]="Invalid";
return false;
}
}
else {
alert("Invalid");
[Link] = "red solid 3px";
[Link]='';
[Link]="Invalid";
return false;
}
}
else {
alert("Invalid");
[Link] = "red solid 3px";
[Link]='';
[Link]="Invalid";
return false;
}
}
else {
/*alert("Invalid");
[Link] = "red solid 3px";
[Link]='';
[Link]="Invalid";
return false;*/
return err(fn)
}
}
function err(ele)
{
[Link] = "red solid 3px";
[Link]='';
[Link]="Invalid";
return false;
}
</script>
</head>
<body bgcolor="cyan">
<center>
<h1>Email Registration</h1>
<form>
<fieldset style="width:300px">
<legend>Registation Form</legend>
<table>
<tr>
<input type="text" id="fn" placeholder="Firstname" maxlength="10">
</tr>
<br><br>
<tr>
<input type="text" id="ln" placeholder="Lastname” maxlength="10">
</tr>
<br><br>
<tr>
<input type="text" id="un" placeholder="UserName" maxlength="10">
</tr>
<br><br>
<tr>
<input type="email" id="e" placeholder="Email" >
</tr>
<br><br>
<tr>
<input type="password" id="pwd" placeholder="Password">
</tr>
<br><br>
<tr>
<input type="password" id="cpwd" placeholder="Confirm">
</tr>
<br><br>
<tr>
<input type="text" id="ph" placeholder="Mobile">
</tr>
<br><br>
<tr>
<label>Gender:</label>
<select id="gender">
<option value="male">male</option>
<option value="female">female</option>
<option value="others">others</option>
</select>
</tr>
<br><br>
<tr><input type="submit" onclick="return validate()" value="create">
</tr>
</table>
</fieldset>
</form></div>
</center>
</body>
</html>
1. What is XML?
2. What is DTD? List types of DTD?
3. Write the rules to create an element in XML?
Pre-Lab
4. What is an XML-Schema? List out types of data types in XML-
Questions Schema?
5. What is XSLT?
Differentiate between DOM and SAX parsers?
Program Code:
[Link]
<?xml version="1.0" encoding="UTF-8" standalone=” yes”?>
<!DOCTYPE book SYSTEM “[Link]">
<bookstore>
<book>
<title>web programming</title>
<author>chrisbates</author>
<ISBN>123-456-789</ISBN>
<publisher>wiley</publisher>
<edition>3</edition>
<price>350</price>
</book>
<book>
<title>internet worldwideweb</title>
<author>ditel&ditel</author>
<ISBN>123-456-781</ISBN>
<publisher>person</publisher>
<edition>3</edition>
<price>450</price>
</book>
</bookstore>
[Link]
XML Schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:xs="[Link]
<xs:element name="bookstore">
<xs:complexType>
<xs:sequence>
<xs:element name="book" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"></xs:element>
<xs:element name="author" type="xs:string"></xs:element>
<xs:element name="ISBN" type="xs:string"></xs:element>
<xs:element name="publisher" type="xs:string"></xs:element>
<xs:element name="edition" type="xs:int"></xs:element>
<xs:element name="price" type="xs:decimal"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Program Code:
[Link]
<?xml version="1.0"?>
<xs:schema xmlns:xs="[Link]
<xs:element name="catalog">
<xs:complexType>
<xs:sequence>
<xs:element ref="book" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="book">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="author" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="publisher" type="xs:string" minOccurs="1"maxOccurs="1"/>
<xs:element name="pages" type="xs:integer" minOccurs="1"maxOccurs="1"/><xs:element
name="price" type="xs:decimal" minOccurs="1"maxOccurs="1"/></xs:sequence>
<xs:attribute name="course" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
[Link]
[Link]
title {font-family:serif;color:green;font-size:18pt}
author{font-family:arial;color:red;font-size:12pt}
publisher{font-family:arial;color:green;font-size:12pt}
pages{font-family:arial;color:#AABB12;font-size:12pt}
price{font-family:arial;color:blue;font-size:12pt}
Program Output/ Expected Output
1. What is JDBC?
2. Write down the steps to connect a Java application with sql database?
3. What is a driver? List out the different types of JDBC drivers?
Pre-Lab
4. What packages need to be imported for working on JDBC?
Questions 5. How do we configure the system to work with JDBC?
6. Write an SQL query to create a table, insert rows into the table,
retrieve the result, update a row in a table and delete a row in a table?
8(i) //Program to Create EmployeeTable in MySQL
mport [Link].*; // first step
import [Link].*;
public class Employee {
public static void main(String args[]) {
try {
//[Link]
[Link]("[Link]"); //second step
Connection
con=[Link]("jdbc:mysql://localhost:3306/vce_cse","root","");
//third step
Statement st=[Link](); //fourth step
[Link]("create table IF NOT EXISTS emp1( no integer(10),name varchar(30),
salary integer(10),department varchar(40))"); // execute a query
[Link]("Table Created");
[Link]();
}
catch(Exception e)
{
[Link](e);
}
}
}
Settings 1. download mysql-connector-java-5.1.48 zip file - extract
2. [Link] and copy in
C:\Program Files(x86)\Java\jre7\lib\ext folder of java.
3. Set classpath for the jar file in environment variables
Variable name:Classpath
Variable Valu[Link]\Program Files (x86)\Java\jre7\lib\ext\mysql-connector-java-5.1.48-
[Link];.;
Output
Cross Verify in XAMPP Server phpMyAdmin under vce_cse database
Output
[Link]();
}
catch(Exception e)
{
[Link](e);
}
}
}
Before Update the Table the data in employee table is:
Output
Output
Output
Output
Output
Program [Link]
<html>
<head>
<title>login form</title>
</head>
<body>
<form method="post" action="login">
Email ID:<input type="text" name="email" /><br/>
Password:<input type="text" name="pass" /><br/>
<input type="submit" value="login" />
</form>
</body>
</html>
[Link]
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
if([Link](email, pass))
{
RequestDispatcher rs = [Link]("[Link]");
[Link](request, response);
}
else
{
[Link]("Username or Password incorrect");
RequestDispatcher rs = [Link]("[Link]");
[Link](request, response);
}
}
}
[Link]
import [Link].*;
}
catch(Exception e) {
[Link]();
}
return st;
}
}
[Link]
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>Login</servlet-class>
</servlet>
<servlet>
<servlet-name>Welcome</servlet-name>
<servlet-class>Welcome</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/login</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Welcome</servlet-name>
<url-pattern>/Welcome</url-pattern>
</servlet-mapping>
</web-app>
NOTE: Follow the below steps to deploy your application in tomcat server: