Web Development :-
Chapter no 1 :-
Q:- What is a web Application?
Ans:- A web application is software that runs on a browser and allows users to
perform tasks online.
Q:- What is a website and a web page?
Ans:- A website is a group of web pages, while a web page is a single document
of that site.
Q:- What is HTML?
Ans:- HTML is a markup language used to design the structure and content of a
web page.
Q:- What is HTTP?
Ans:- HTTP is a communication protocol for transferring data between browser
and server.
Q:- What is an HTTP Request?
Ans:- An HTTP request is a message from a browser asking a server for some
data or service.
Q:- What is a GET method?
Ans:- The GET method is used to request and read information from the server
without changes.
Q:- Define POST method?
Ans:- The POST method is used to send data to a server, mostly for saving or
processing it.
Q:- What is server side programming? Write names of server side programming
languages.
Ans:- Server-side programming runs on the server; examples are PHP, Python,
Java, and [Link].
Q:- What is client side programming? Write names of some client side
programming languages.
Ans:- Client-side programming runs on the browser; examples are HTML, CSS,
and JavaScript.
Q:- Define JavaScript?
Ans:- JavaScript is a scripting language that makes web pages interactive and
user-friendly.
Q:- What is an application layer?
Ans:- The application layer provides direct services like email and web browsing
to users.
Q:- Write two benefits of three layer model of web application layers.
Ans:-It increases security and makes maintenance or updates easier for web
applications.
CHAPTER NO 2 :-
Q:- What is Tomcat?
Ans:- Tomcat is a free web server and servlet container used to run Java-based
web applications.
Q:- Write some advantages of Tomcat?
Ans:-Tomcat is lightweight, easy to use, open-source, and supports Java
Servlets and JSP.
Q:- What is NetBeans?
Ans:- NetBeans is an IDE (Integrated Development Environment) used to build
Java and web applications.
Q:- What is WEB-INF?
Ans:- WEB-INF is a special folder in a web app that stores configuration files and
server-side code.
Q:- What is [Link] or Deployment Descriptor?
Ans:- [Link] is a configuration file inside WEB-INF that defines how a web
application runs.
Q:- Write names of Web Application Development Stages.
Ans:- Stages are: Requirement, Design, Development, Testing, Deployment, and
Maintenance.
CHAPTER NO 3:-
Q:- What is HTML tag and give one example?
Ans:- HTML tags are used to define elements in a web page, e.g., <p> This is a
paragraph </p>.
Q:- Write any five HTML tags?
Ans:- Examples: <h1>, <p>, <a>, <img>, <table>.
Q:- What is CSS?
Ans:- CSS (Cascading Style Sheets) is used to style and design the look of web
pages.
Q:- What is an Internal CSS?
Ans:- Internal CSS is written inside <style> tags in the head section of an HTML
page.
Q:- Explain External CSS.
Ans:- External CSS is stored in a separate .css file and linked to the HTML page.
Q:- Why we use CSS?
Ans:- We use CSS to make web pages attractive, well-structured, and easy to
maintain.
Q:- Describe cellpadding and cells pacing attributes.
Ans:- Cellpadding sets space inside table cells, while cells pacing sets space
between cells.
Q:- How can you add a header in an HTML page?
Ans:- A header can be added using tags like <h1>Header Text</h1> at the top of
the page.
CHAPTER NO 4:-
Q:- What is JavaScript?
Ans:- JavaScript is a scripting language that makes web pages interactive and
dynamic.
Q:- What can JavaScript Do?
Ans:- JavaScript can validate forms, change HTML/CSS, show alerts, and create
animations.
Q:- Write an example of Hide HTML Element through JavaScript?
Ans:- Example:
[Link]("demo").[Link] = "none";
Q:- Explain JavaScript Functions?
Ans:- A function in JavaScript is a block of code that runs when it is called.
Q:- Write the syntax of JavaScript Functions.
Ans:- function functionName() {
// code to execute
Q:- Define jQuery Selector?
Ans:- A jQuery selector is used to select and manipulate HTML elements easily.
Q:- Define the #id Selector?
Ans:- The #id selector selects an element with a specific id, e.g., $("#demo").
Q:- Define the .class Selector?
Ans:- The .class selector selects all elements with a given class, e.g., $(".box").
Q:- Write any two Examples of jQuery Selectors with Description?
$("#title") → selects an element with id "title".
$(".menu") → selects all elements with class "menu".
Q:- Explain jQuery Hide and Show?
Ans:- jQuery hide() makes elements invisible, while show() makes them visible
again.
Q:- How to create sliding effects on HTML elements with jQuery?
Ans:- We use slide Up(), slide Down(), or slide Toggle() for sliding effects.
CHAPTER NO 5 :-
Q:- What is a Servlet?
Ans:- A Servlet is a Java program that runs on a server to handle web requests
and responses.
Q:- Write any two Advantages of Servlet?
Ans:- Servlets are faster, secure, reusable, and handle multiple requests easily.
Q:- Define a Generic Servlet?
Ans:- A Generic Servlet is a simple, protocol-independent class that extends
GenericServlet.
Q:- What is a HTTP Servlet explain with diagram?
Ans:- An HTTP Servlet handles HTTP requests (GET/POST) and sends responses
like web pages. (diagram usually shows client → request → server → servlet →
response → client)
Q:- Enlist steps of Writing Basic Hello World Servlet?
Ans:- Steps: Create servlet class, extend HTTP Servlet, write doGet() method,
map in [Link], and run.
Q:- What are the processes of Servlet Life Cycle?
Ans:- The life cycle has: Loading, Initialization, Request handling (service), and
Destroying.
Q:- Write any two methods of servlet life cycle?
Ans:- The two main methods are init(), service(), and also destroy().
Q:- Explain the service() Method of servlet life cycle.
Ans:- The service() method handles client requests and sends responses (like
HTML pages).
Q:- Draw the Architecture Diagram servlet life-cycle?
Ans:- Diagram: Client → Request → Web Server → Servlet Container → Servlet (init
→ service → destroy) → Response → Client.
Q:- Explain Servlet and Forms?
Ans:- Servlets process HTML form data sent by the client and return the output
or response.
Q:- What is a [Link]?
Ans:- [Link] is a servlet class used to collect and save user registration
form data.
Q:- What is Form Validating?
Ans:- Form validation checks if user input is correct and complete before
submitting data.
CHAPTER NO 6 :-
Q:- Define JSP?
Ans:- JSP (Java Server Pages) is a technology that allows creating dynamic web
pages using Java.
Q:- Enlist Features of JSP.
Ans:- Features: Easy to use, supports Java code in HTML, reusable components,
and automatic servlet conversion.
Q:- Define Life Cycle of JSP?
Ans:- The JSP life cycle is the process from creation to destruction of a JSP
page on the server.
Q:- Enlist the steps of JSP life cycle.
Ans:- Steps: Translation, Compilation, Loading, Instantiation, Initialization,
Execution, and Destroy.
Q:- What is Instantiation JSP Life cycle?
Ans:- Instantiation means creating the JSP page object from the servlet class.
Q:- What is JSP expression tag?
Ans:- The expression tag <%= %> is used to output values directly into the web
page.
Q:- What is JSP Declaration Tag?
Ans:- The declaration tag <%! %> is used to declare variables and methods in
JSP.
Q:-Difference between JSP Scriptlet tag and Declaration tag.
Ans:- Scriptlet <% %> contains Java code that runs at request time, while
Declaration <%! %> defines variables/methods.
Q:- What is a JSP Standard Actions?
Ans:- JSP Standard Actions are built-in tags used to control behavior, like
including files or forwarding requests.
Q:- Write any two JSP Action Tags with Description?
<jsp:include> → Includes another resource in the page.
<jsp:forward> → Forwards request to another page.
CHAPTER NO 7 :-
Q:- What is Session?
Ans:- A session is a way to store user data on the server for multiple requests in
a web application.
Q:- What is Cookies?
Ans:- Cookies are small text files saved in the browser to store user information
temporarily.
Q:- What is Session Cookies?
Ans:- Session cookies are temporary cookies that are deleted when the browser
is closed.
Q:- What is Persistent Cookies?
Ans:- Persistent cookies are stored on the user’s device and remain even after
closing the browser.
Q:- Explain URL Rewriting.
Ans:- URL rewriting adds extra data (like session ID) into the URL to track user
sessions.
Q:- Explain Hidden Field.
Ans:- A hidden field is an invisible form element used to store and send data
between pages.
Q:- Explain Working with HTTP Session.
Ans:- An HTTP session is created by the server to identify a user and store their
data during browsing.
CHAPTER NO 8 :-
Q:- Define JDBC.
Ans:- JDBC (Java Database Connectivity) is an API that allows Java programs to
connect and interact with databases.
Q:- Why should we use JDBC?
Ans:- We use JDBC to send SQL queries, update data, and easily connect Java
applications with databases.
Q:- What is API?
Ans:- API (Application Programming Interface) is a set of tools and rules that lets
programs communicate.
Q:- What is MySQL?
Ans:- MySQL is a free, open-source relational database management system
used to store and manage data.
Q:- Explain advantages of MySQL.
Ans:- It is fast, reliable, secure, supports large databases, and works on multiple
platforms.
Q:- Explain connecting to the database.
Ans:- Connecting means establishing a link between a Java program and a
database using JDBC.
Q:- What is Sequential Access?
Ans:- Sequential access means reading or writing data in order, one record after
another.
Q:- What is Random Access?
Ans:- Random access means directly reaching any data item without reading in
sequence.
Q:- Why we import JDBC package?
Ans:- We import JDBC packages to use classes and interfaces needed for
database operations.
Q:- Explain Register JDBC Driver.
Ans:- Registering JDBC driver means loading the driver class so Java can
connect with the database.
Q:- Explain Connection Object.
Ans:-A Connection object represents the active link between a Java program
and a database.
CHAPTER NO 9 :-
Q:- Define Custom Tag.
Ans:- A custom tag in JSP is a user-defined tag that performs specific tasks and
simplifies code.
Q:- Write the advantages of Custom Tags.
Ans:- They make code reusable, easy to read, reduce scriptlet code, and
separate logic from design.
Q:- Define Custom Tag Handler.
Ans:- A tag handler is a Java class that defines how a custom tag will behave at
runtime.
Q:- Define Simple Tag Handler.
Ans:- Simple tag handler is an easy interface (Simple Tag) for creating custom
tags with less code.
Q:- Define Classic Tag Handler.
Ans:- Classic tag handler uses the Tag or Body Tag interface to create advanced
custom tags.
Q:- Simple Attributes.
Ans:- Simple attributes are normal values passed to a tag, like strings or
numbers.
Q:- Fragment Attributes.
Ans:- Fragment attributes allow passing a block of JSP code as an attribute to a
tag.
Q:-Dynamic Attributes.
Ans:- Dynamic attributes let a tag accept unlimited and flexible attributes at
runtime.
CHAPTER NO 10 :-
Q:- What is JSF?
Ans:- JSF (JavaServer Faces) is a Java framework used to build user interfaces
for web applications.
Q:- Write any two benefits of JSF?
Ans:- It provides reusable UI components and supports faster, easier web
development.
Q:- How JSF is used with JSP?
Ans:- JSF tags can be added inside JSP pages to create dynamic and
component-based web UIs.
Q:- What is URI?
Ans:- URI (Uniform Resource Identifier) is a string used to identify a resource on
the web.
Q:- Write names of phases in JSF life cycle.
Ans:- Phases: Restore View, Apply Request Values, Process Validations, Update
Model, Invoke Application, Render Response.
Q:- What is JSF Tag Library?
Ans:- JSF tag library is a collection of special tags used to design JSF user
interfaces.
Q:-Give names of JSF libraries.
Ans:- Examples: HTML tag library (h:), Core tag library (f:).
Q:- Describe Attribute Tag in JSF.
Ans:- The <f:attribute> tag passes custom attributes or values to JSF
components.