01. Define HTML forms and their types.
Ans:- HTML Forms
Definition:
HTML forms are elements used in web pages to collect user input. They provide an interface where users
can enter data, such as text, selections, or files, which can then be submitted to a server for processing.
Forms are created using the <form> tag in HTML and include various types of input elements like text
fields, checkboxes, radio buttons, submit buttons, etc.
Types of HTML Forms (based on input elements and form usage):
1. Simple Forms:
2. Search Forms:
3. File Upload Forms:
4. Inline Forms:
5. Custom Forms:
02. Explain the concept of Cascading Style Sheets.
Ans:- Cascading Style Sheets (CSS) is a style sheet language used to describe the
presentation of a document written in HTML or XML. It essentially controls the look and
formatting of web pages, including layout, colors, fonts, and other visual aspects. The
"cascading" part refers to a system that determines which style rules are applied when
multiple rules might apply to the same element, prioritizing certain styles over others.
Here's a more detailed breakdown:
Key Concepts:
Style Sheet Language:
CSS is a language specifically designed for defining the visual presentation of documents.
Presentation, not Content:
CSS focuses on how content is displayed, not on the content itself, which is handled by HTML or
XML.
03. What is the purpose of Document Type Definition (DTD) in XML?
Ans:- Definition:
A Document Type Definition (DTD) is a set of rules or a schema that defines the structure, legal elements,
and attributes of an XML document.
Purpose:
Define Structure: DTD specifies what elements and attributes are allowed in an XML document
and how they are organized hierarchically.
Validation: It ensures that an XML document adheres to a predefined format, making sure the data
is well-formed and valid according to the specified rules.
04. Write a short note on Arrays in JavaScript with an example
Ans:- Arrays in JavaScript
An array in JavaScript is a special type of object used to store multiple values in a single variable. These
values can be of any data type, including numbers, strings, objects, or even other arrays. Arrays maintain the
order of elements and use zero-based indexing, meaning the first element is at index 0.
JavaScript arrays are dynamic, so you can add or remove elements at any time.
Example:
javascript
CopyEdit
// Creating an array of fruits
let fruits = ["Apple", "Banana", "Orange"];
// Accessing elements
console.log(fruits[0]); // Output: Apple
05. Differentiate between Static HTML and Dynamic HTML.
Ans:- Sure! Here’s a clear comparison between Static HTML and Dynamic HTML:
Aspect Static HTML Dynamic HTML (DHTML)
HTML pages with fixed content HTML pages that can change content, style, or
Definition that doesn’t change unless structure dynamically without reloading the page, using
manually edited. scripts like JavaScript.
Fixed and remains the same for Can change based on user interaction or other factors
Content
every user. (like time or input).
Highly interactive with animations, form validation,
Interactivity Limited or none.
dynamic menus, etc.
Technologies
Only HTML and CSS. HTML, CSS, JavaScript, and DOM manipulation.
Used
06. List the steps to configure Tomcat server for JSP applications
Ans:- Steps to Configure Tomcat Server for JSP Applications:
1. Download and Install Tomcat:
o Go to the official Apache Tomcat website.
o Download the appropriate version for your OS.
o Extract the downloaded archive to a preferred directory.
2. Set Environment Variables (Optional but Recommended):
o Set JAVA_HOME to your Java JDK installation path.
o Add the Tomcat bin directory to your system PATH for easy command-line access.
07. Explain how Ajax improves web applications
Ans:- Ajax (Asynchronous JavaScript and XML) is a technique that allows web pages to communicate with
a server asynchronously, without needing to reload the entire page. This leads to several improvements in
web applications:
1. Faster and More Responsive User Experience:
Ajax enables parts of a webpage to update independently, so users don’t have to wait for full page
reloads. This makes interactions smoother and faster.
2. Reduced Server Load and Bandwidth Usage:
Since only necessary data is exchanged between client and server (not the entire page), network
traffic and server processing are reduced.
08. How can you use Cookies in JSP?
Ans:- Using Cookies in JSP
Cookies are small pieces of data stored on the client’s browser that help maintain stateful information
between requests. In JSP, you can create, read, and delete cookies using the javax.servlet.http.Cookie
class.
1. Creating and Sending a Cookie
To create a cookie and send it to the client, you:
Instantiate a Cookie object.
Set its properties (like name, value, max age).
Add it to the HTTP response.
jsp
CopyEdit
09. Discuss the life cycle of a Servlet.
Ans:- Life Cycle of a Servlet
A Servlet is a Java program that runs on a server and handles requests and responses in a web application.
The Servlet life cycle describes the stages a Servlet goes through from creation to destruction.
10. Write a PHP script to validate a form input.
Ans:-
11. Explain String handling functions in PHP.
Ans:- String Handling Functions in PHP
PHP offers a rich set of built-in functions to work with strings, allowing you to perform operations like
searching, modifying, splitting, and formatting text easily.
Common PHP String Functions:
Function Description Example
Returns the length of the
strlen($str) strlen("Hello") →5
string
strpos($haystack, $needle)
Finds the position of the first strpos("Hello world", "world") →
occurrence of a substring 6
Function Description Example
Replaces all occurrences of a str_replace("world", "PHP",
str_replace($search,
search string with a
$replace, $subject) "Hello world") → "Hello PHP"
replacement
12. What are regular expressions? Give an example in PHP.
Ans:- egular expressions (often abbreviated as regex or regexp) are patterns used to match character combinations
in strings. They provide a powerful way to search, match, and manipulate text based on complex criteria.
Example: Validate an Email Using Regex in PHP
php
CopyEdit
<?php
$email = "user@example.com";
// Define a simple regex pattern for email validation
$pattern = "/^[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/";
if (preg_match($pattern, $email)) {
echo "Valid email address.";
} else {
echo "Invalid email address.";
}
?>
13. Explain Operator Precedence in PHP with examples.
Ans:- Operator precedence determines the order in which operators are evaluated in an expression. When an
expression contains multiple operators, PHP uses the precedence rules to decide which operations to perform first.
Examples:
1. Without parentheses
php
CopyEdit
<?php
$result = 2 + 3 * 4;
echo $result; // Outputs 14
?>
14. What is session tracking? How is it achieved in JSF?
Ans:- Session tracking is the process of maintaining state and data across multiple requests from the same
user during a browsing session. Since HTTP is stateless (each request is independent), session tracking
allows the server to remember user information like login status, preferences, or shopping cart contents as
the user navigates a web application.
How is Session Tracking Achieved in JSF?
JSF provides several built-in mechanisms to track sessions and maintain user data:
1. Session Scope Managed Beans:
o In JSF, you can define managed beans (Java classes) with different scopes.
o The @SessionScoped annotation or <managed-bean-scope>session</managed-bean-
scope> in faces-config.xml indicates that the bean instance will be stored in the user's
session.
o This means data in that bean persists across multiple HTTP requests in the same session.
15. What are the advantages of using NetBeans IDE for Web Development?
Ans:- Advantages of Using NetBeans IDE for Web Development
1. All-in-One Environment
NetBeans provides an integrated platform that supports multiple web technologies like HTML, CSS,
JavaScript, PHP, JSP, and Java EE. This means you can develop front-end and back-end in one
place.
2. Code Completion and Syntax Highlighting
It offers intelligent code completion, syntax highlighting, and error checking, which helps speed up
development and reduces errors.
3. Built-in Support for Popular Frameworks
NetBeans supports frameworks like JSF, Spring, Hibernate, and PHP frameworks (Laravel,
Symfony), easing development and configuration.
16. Differentiate between JDBC and ODBC.
Ans:- Sure! Here’s a clear comparison between JDBC and ODBC:
Feature JDBC (Java Database Connectivity) ODBC (Open Database Connectivity)
Java API to connect and interact with
Definition C-based API to access different databases
databases
Designed specifically for Java Platform-independent, but mostly used with
Platform
applications C/C++ and Windows
Language Supports multiple programming languages like
Supports only Java
Support C, C++, Python, etc.
Database Uses Java drivers (Type 1 to Type 4) to
Uses drivers called ODBC drivers to connect
Access connect
Platform-independent because Java is
Portability Requires ODBC drivers installed on the client
platform-independent
17. What is the role of Servlets in database connectivity?
Ans;- Role of Servlets in Database Connectivity
Servlets are Java programs that run on a web server and handle client requests, often forming the backbone
of web applications. When it comes to database connectivity, servlets act as the middle layer between the
client (usually a web browser) and the database.
18. Write an XML schema for a "Bookstore" application
Ans: - Sure! Here's a simple XML Schema (XSD) for a "Bookstore" application. This schema defines a
bookstore that contains multiple books, with each book having details like title, author(s), price, and
publication year.
xml
CopyEdit
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Root element -->
<xs:element name="bookstore">
<xs:complexType>
<xs:sequence>
<!-- One or more book elements -->
<xs:element name="book" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<!-- Author can be one or more -->
<xs:element name="author" maxOccurs="unbounded" minOccurs="1"
type="xs:string"/>
<xs:element name="price" type="xs:decimal"/>
<xs:element name="year" type="xs:gYear"/>
</xs:sequence>
<!-- Optional attribute ISBN -->
<xs:attribute name="isbn" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Explanation:
The root element is <bookstore>, which contains one or more <book> elements.
Each <book> has:
o <title> (string)
o One or more <author> elements (string)
o <price> (decimal)
o <year> (year only, format YYYY)
The <book> can have an optional isbn attribute.
Example of an XML document valid against this schema:
xml
CopyEdit
<bookstore>
<book isbn="978-1234567890">
<title>Learning XML</title>
<author>John Doe</author>
<author>Jane Smith</author>
<price>29.99</price>
<year>2023</year>
</book>
<book>
<title>Mastering Java</title>
<author>Emily White</author>
<price>39.99</price>
<year>2021</year>
</book>
</bookstore>
If you want, I can help you extend this schema with more details like publisher info, categories, or
availability!
19. Explain Document Object Model (DOM) in XML with a diagram.
Ans:- The Document Object Model (DOM) is a tree-like representation of an XML (or HTML)
document. It treats the entire document as a hierarchy of nodes, where:
Each tag is an element node
Each attribute is an attribute node
Text content is a text node
This model allows you to access, traverse, add, modify, or delete parts of an XML document using
programming languages like Java, Python, or JavaScript.
📄 Example XML Document
xml
CopyEdit
<company>
<employee id="E001">
<name>John Doe</name>
<position>Manager</position>
</employee>
</company>
🌳 DOM Tree Structure (Diagram)
mathematica
CopyEdit
Document
└── Element: company
└── Element: employee (attribute: id="E001")
├── Element: name
│ └── Text: "John Doe"
└── Element: position
└── Text: "Manager"
20. Write a JavaScript program to validate a login form (Username and Password).
Ans:-
21. Discuss JavaScript events with examples.
Ans:- avaScript events are actions or occurrences that happen in the browser, triggered
by user interactions or the browser itself. They are the foundation of dynamic web
pages, allowing JavaScript code to respond to user actions and changes in the browser
environment.
Common Types of JavaScript Events
Mouse Events: Triggered by mouse interactions, such
as click, mouseover, mouseout, mousedown, mouseup, and mousemove.
Keyboard Events: Triggered by keyboard actions, such as keydown, keyup, and keypress.
Form Events: Related to form elements, such as submit, change, focus, blur, and reset.
Document/Window Events: Related to the browser window or document, such
as load, resize, scroll, and unload.
Input Events: Triggered when the content of an input field changes, such as input, change,
and select.
Event Handling
Event handling is the process of responding to events. JavaScript provides several
ways to handle events:
HTML Attributes:
Using event attributes directly in HTML elements (e.g., <button onclick="myFunction()">Click
Me</button>). This method is simple but can lead to less maintainable code.
DOM Event Properties:
Assigning event handlers to DOM element properties (e.g., button.onclick = function() { ...
};). This method allows only one handler per event type.
Event Listeners:
Using the addEventListener() method to attach event handlers to DOM elements
(e.g., button.addEventListener('click', myFunction);). This is the most flexible and
recommended approach, allowing multiple handlers for the same event.
Examples
click event.
Code
<button id="myButton">Click Me</button>
<p id="message"></p>
<script>
const button = document.getElementById('myButton');
const message = document.getElementById('message');
button.addEventListener('click', function() {
message.textContent = 'Button Clicked!';
});
</script>
22. Explain the architecture of Web Servers and how XAMPP/LAMPP fits into it.
Ans:- Architecture of Web Servers
A web server is software (and hardware) that serves web pages to clients (browsers) over the internet or a
network. Its architecture typically involves:
css
CopyEdit
[ Client (Browser) ]
↓ HTTP Request
[ Web Server Software (e.g., Apache, Nginx) ]
↓
[ Server-side Scripting Engine (e.g., PHP, Python) ]
↓
[ Database Server (e.g., MySQL, MariaDB) ]
↑
↓
[ Processed Data or HTML ]
↑
[ Web Server ]
↑
[ Client (Browser) ]
Client (Browser): Sends requests (e.g., for a webpage).
Web Server Software: Receives requests, serves static files (HTML, CSS, JS) or passes dynamic
requests to a scripting engine.
Scripting Engine: Executes server-side code (like PHP), generating dynamic content.
Database Server: Stores and retrieves data requested by scripts.
Response: The generated HTML/data is sent back to the client.
2️⃣ What is XAMPP / LAMPP?
XAMPP is a free, easy-to-install package that bundles essential components needed to run a web
server locally for development:
o Apache: The web server software
o MySQL/MariaDB: The database server
o PHP: The server-side scripting language
o Perl (optional)
o Additional tools like phpMyAdmin (web-based DB management)
LAMPP is basically the Linux version of XAMPP.
3️⃣ How XAMPP/LAMPP Fits Into the Web Server Architecture
XAMPP/LAMPP provides all layers of a typical web server stack on your personal computer:
css
CopyEdit
[ Browser (localhost) ]
↓
[ Apache (web server from XAMPP) ]
↓
[ PHP engine (runs your PHP scripts) ]
↓
[ MySQL/MariaDB database ]
↑
[ Data / HTML generated ]
↑
[ Apache ]
↑
[ Browser ]
You develop and test web applications locally without needing an internet connection.
It simulates a live web server environment by combining Apache, PHP, and MySQL into one easy
package.
23. Explain the life cycle of JavaServer Pages (JSP) with neat diagrams.
Ans:- Life Cycle of JSP
The JSP life cycle is the process that a JSP page goes through from the moment it is requested by a client to
the response being sent back. It consists of several phases handled by the JSP container (like Apache
Tomcat).
1. Translation Phase
The JSP file (.jsp) is translated into a Java Servlet source file (.java).
This servlet contains the equivalent Java code for the JSP.
2. Compilation Phase
The generated Java servlet source file is compiled into a Java bytecode class file (.class).
3. Loading and Initialization
The servlet class is loaded by the container.
The servlet's jspInit() method is called once to initialize the servlet (similar to init() in servlets).
4. Request Handling Phase
For each client request, the servlet’s _jspService() method is invoked.
This method contains the logic generated from JSP to produce the response (HTML).
This phase runs multiple times, once per request.
5. Destroy Phase
When the JSP is to be removed (server shutdown or reload), the container calls the jspDestroy()
method to perform cleanup.
🖼️ JSP Life Cycle Diagram
scss
CopyEdit
Client Request
↓
[JSP File]
↓ Translation (JSP → Servlet Java Code)
↓ Compilation (Java Code → Servlet Class)
↓ Load Servlet Class
↓ Call jspInit() (Initialization)
↓ For Each Request:
Call _jspService() → Generate Response
↓
Server Shutdown or Reload:
Call jspDestroy() (Cleanup)
24. Discuss session management techniques in JSP and Servlets.
Ans:- What is Session Management?
HTTP is a stateless protocol — meaning each request is independent, and the server doesn’t
remember previous requests.
Session management helps track and maintain user state (like login info, shopping cart, preferences)
across multiple requests.
🛠️ Session Management Techniques in JSP/Servlets
1. Cookies
Small pieces of data stored on the client’s browser.
Server sends a cookie in response; browser returns it in subsequent requests.
Example: session ID stored as a cookie.
How to use in Servlets:
java
CopyEdit
// Create a cookie
Cookie userCookie = new Cookie("username", "JohnDoe");
userCookie.setMaxAge(60*60); // 1 hour
response.addCookie(userCookie);
2. URL Rewriting
Append session information (like session ID) to the URL as a query parameter.
Useful if cookies are disabled on the client.
Example:
java
CopyEdit
String url = response.encodeURL("profile.jsp");
response.sendRedirect(url);
encodeURL() appends session ID if cookies are disabled.
3. Hidden Form Fields
Session data stored in hidden fields inside HTML forms.
Data is submitted back to the server on form submission.
Example:
html
CopyEdit
<form action="nextPage.jsp" method="post">
<input type="hidden" name="sessionID" value="<%= session.getId() %>">
<!-- other form fields -->
<input type="submit" value="Submit">
</form>
4. HttpSession Object (Most Common & Recommended)
Server-side session tracking mechanism.
Each user gets a unique HttpSession object to store user-specific data.
Usage in Servlets:
java
CopyEdit
HttpSession session = request.getSession(); // Creates or retrieves session
session.setAttribute("username", "JohnDoe"); // Store data
String user = (String) session.getAttribute("username"); // Retrieve data
Sessions are tracked automatically by the container (usually via cookies or URL rewriting).
25. Design a web page using Java Server Faces components.
Ans:- Absolutely! Here's a simple JavaServer Faces (JSF) web page example with basic JSF components,
showing a user registration form:
1. JSF Page: register.xhtml
xml
CopyEdit
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:head>
<title>User Registration</title>
</h:head>
<h:body>
<h:form>
<h2>User Registration</h2>
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="username" value="Username:" />
<h:inputText id="username" value="#{userBean.username}" required="true"
label="Username" />
<h:outputLabel for="email" value="Email:" />
<h:inputText id="email" value="#{userBean.email}" required="true"
label="Email" />
<h:outputLabel for="password" value="Password:" />
<h:inputSecret id="password" value="#{userBean.password}" required="true"
label="Password" />
</h:panelGrid>
<h:commandButton value="Register" action="#{userBean.register}" />
<h:messages style="color:red;" />
</h:form>
</h:body>
</html>
2. Backing Bean: UserBean.java
java
CopyEdit
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
@ManagedBean(name = "userBean")
@RequestScoped
public class UserBean {
private String username;
private String email;
private String password;
// Getters & Setters
public String getUsername() { return username; }
public void setUsername(String username) { this.username = username; }
public String getEmail() { return email; }
public void setEmail(String email) { this.email = email; }
public String getPassword() { return password; }
public void setPassword(String password) { this.password = password; }
// Action method for registration
public String register() {
if(username != null && email != null && password != null) {
// Registration logic (e.g., save to DB) goes here
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(FacesMessage.SEVERITY_INFO, "Registration
successful!", null));
return "success"; // Navigate to success.xhtml (configure navigation)
} else {
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Please fill all
fields.", null));
return null; // Stay on the same page
}
}
}
26. Write a complete PHP script to create and read cookies.
Ans:- Sure! Here's a complete PHP script that creates a cookie, and then reads and displays it on the page:
php
CopyEdit
<?php
// Set a cookie named "user" with value "JohnDoe" that expires in 1 hour
$cookie_name = "user";
$cookie_value = "JohnDoe";
setcookie($cookie_name, $cookie_value, time() + 3600, "/"); // '/' means available
across the whole domain
?>
<!DOCTYPE html>
<html>
<head>
<title>PHP Cookie Example</title>
</head>
<body>
<?php
if (!isset($_COOKIE[$cookie_name])) {
echo "Cookie named '" . $cookie_name . "' is not set!";
} else {
echo "Cookie '" . $cookie_name . "' is set!<br>";
echo "Value is: " . $_COOKIE[$cookie_name];
}
?>
</body>
</html>
How it works:
The setcookie() function sends a cookie to the client’s browser.
The cookie is not available immediately on the same page load because headers are sent before
output; it becomes available on the next request.
When the page reloads or you visit again within the cookie lifetime, the cookie value is read from
$_COOKIE.
27. Create a PHP application to perform CRUD operations on MySQL database.
Ans:- Got it! Here's a simple PHP CRUD application that performs Create, Read, Update, and Delete
operations on a MySQL database using procedural MySQLi. This example assumes you have a database
and table ready.
1. Setup
MySQL Database & Table
sql
CopyEdit
CREATE DATABASE mydb;
USE mydb;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE
);
2. PHP CRUD Application
config.php — Database connection
php
CopyEdit
<?php
$servername = "localhost";
$username = "root";
$password = ""; // set your DB password
$dbname = "mydb";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
?>
28. Discuss in detail the use of regular expressions for form validation in PHP.
Ans:- Certainly! Here's a detailed discussion on using regular expressions (regex) for form validation in
PHP:
🔍 What Are Regular Expressions?
Regular Expressions are patterns used to match character combinations in strings.
They allow precise rules for validating user input — such as formats for emails, phone numbers,
passwords, etc.
In PHP, regex functions like preg_match(), preg_replace() are commonly used.
Why Use Regular Expressions for Form Validation?
To ensure data integrity by enforcing specific input formats.
To prevent invalid data submission (like malformed emails, phone numbers).
To enhance security by restricting input types, reducing injection risks.
To provide immediate feedback on user input correctness.
Basic PHP Regex Function for Validation: preg_match()
php
CopyEdit
if (preg_match("/pattern/", $input)) {
// Input matches the pattern (valid)
} else {
// Invalid input
}
Returns 1 if the pattern matches, 0 if not, and FALSE if an error occurs.
29. Write a Servlet program to fetch and display records from a database.
Ans:- Sure! Here's a complete example of a Java Servlet program that fetches and displays records from a
database using JDBC.
Assumptions:
You have a database (e.g., MySQL) with a table named users having columns: id, name, email.
JDBC driver for your database is included in your project.
Servlet API is set up (e.g., using Apache Tomcat).
1. Database Table Example (MySQL)
sql
CopyEdit
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100),
email VARCHAR(100)
);
2. Servlet Code (UserListServlet.java)
java
CopyEdit
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/users")
public class UserListServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
30. Explain database connectivity steps in JSP with code examples.
Ans:- Certainly! Here's a clear explanation of database connectivity in JSP along with code examples.
Database Connectivity Steps in JSP
1. Load the JDBC Driver
Load the database driver class to allow JSP to talk to the database.
2. Establish Connection
Use DriverManager.getConnection() with the database URL, username, and password.
3. Create a Statement
Use the connection to create a Statement or PreparedStatement object to execute SQL queries.
4. Execute Query
Run SQL commands (e.g., SELECT, INSERT) using the statement object.
5. Process ResultSet
If the query returns data (SELECT), iterate over the ResultSet to get data.
6. Close Resources
Close ResultSet, Statement, and Connection objects to free up resources.
Simple JSP Example: Fetch and Display Data from MySQL
jsp
CopyEdit
<%@ page import="java.sql.*" %>
<html>
<head><title>Database Connectivity in JSP</title></head>
<body>
<h2>User List</h2>
<%
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;