0% found this document useful (0 votes)
231 views

Question Bank

The document provides an overview of web development concepts including: 1) It defines a web application as a computer program that utilizes web browsers and web technology to perform tasks over the internet. 2) It explains the difference between client-side and server-side programming, where client-side means the action takes place on the user's computer and server-side means the action takes place on a web server. 3) It covers common web technologies like HTML, CSS, JavaScript and how they are used in web applications.

Uploaded by

HAnsian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
231 views

Question Bank

The document provides an overview of web development concepts including: 1) It defines a web application as a computer program that utilizes web browsers and web technology to perform tasks over the internet. 2) It explains the difference between client-side and server-side programming, where client-side means the action takes place on the user's computer and server-side means the action takes place on a web server. 3) It covers common web technologies like HTML, CSS, JavaScript and how they are used in web applications.

Uploaded by

HAnsian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Chapter#01

1-what is a web application?


A web application is a computer program that utilizes web browsers and web
technology to perform tasks over the internet.
2-write difference b/w client side and server side?
Client-side means that the action takes place on the user's (the client's)
computer. Server-side means that the action takes place on a web server.
3-Define HTML and Javascript?

HTML stands for Hyper Text Markup Language .HTML describes the structure of
Web pages using markup. JavaScript is a dynamic computer programming
language. It is lightweight and most commonly used as a part of web pages.
4-Define a web page and a website ?
A web page is a document that is suitable for the World Wide Web and web browsers. A
set of related web pages located under a single domain name and published on at least one
web server. For example www.tevta.gop.pk
5-Define WWW & Protocol?
The World Wide Web (WWW) is combination of all resources and users on the Internet that
are using the Hypertext Transfer Protocol (HTTP).
When computers communicate with each other, there needs to be a common set of rules
and instructions that each computer follows. A specific set of communication rules is called
a protocol.
6-How HTTP works?
HTTP is a request response protocol to communicate asynchronously between client and
server. Mostly in HTTP a browser acts as a client and a web-server. A client (browser)
submits an HTTP request to the server; then the server returns a response to
the client. The response contains status information about the request and may
also contain the requested content
7-Write HTTP methods/requests?
GET ,POST ,PUT ,HEAD ,DELETE , PATCH ,OPTIONS
8-Define server side programming? write any two languages.
It is the program that runs on server dealing with the generation of content of web page.
Languages are : PHP ,C++
9-Define client side programming? Write any two languages.
It is the program that runs on the client machine (browser) and deals with the user
interface and any other processing that can happen on client machine like reading/writing
cookies.
Languages are: Javascript, HTML, CSS
10-Define CSS ?

stands for Cascading Style Sheets .CSS describes how HTML elements are to be


displayed on screen, paper, or in other media.
11-Why we use css?
 CSS saves a lot of work
 better control over layout better control over text display
 separate form from structure
 better site maintainability
 smaller Web pages which means faster downloads
12- Enlist web application layer’s?
 Presentation layer
 Bussiness layer
 Data layer
13-Define HTTP ?
HTTP (Hypertext Transfer Protocol) is the set of rules for transferring files (text, graphic
images, sound, video, and other multimedia files) on the World Wide Web.

14- Write the purpose of client side programming/ why we use client side
programming/advantages?
 Interact with temporary storage
 Make interactive web pages
 Interact with local storage
 Sending request for data to server
 Send request to server
15- Write the purpose of server side programming/why we use server side
programming/advantages?
 Querying the database
 Operations over databases
 Access/Write a file on server.
 Interact with other servers.
 Structure web applications
Long Questions:
1-what is HTTP Basics? How HTTP works ?write down its methods/requests?
2-Describe server side programming and languages used for server side programming?
3-Describe client side programming and languages used for client side programming?
4-what is web application? describe web application layers ?

Chapter#2

1-Define Apache Server?


Apache is an open-source and free web server software that powers around 46% of
websites around the world. The official name is Apache HTTP Server. - It will run on pretty
much any OS (Linux, Windows and MacOS),It is actively maintained.

2- Define Apache Tomcat Server?


For Java Servlets, Tomcat is an application server designed to execute Java servlets.

3-write any three properties of apache tomcat server?


 It is Incredibly Lightweight
 It is Open-Source
 It is Highly Flexible
4- Define Netbean (IDE) ?
It is an integrated development environment for Java. NetBeans allows applications to be
developed from a set of modular software components called modules.
5-Define Eclipse IDE?
It is an integrated development environment(IDE) used in computer programming, and is
the most widely used Java IDE. Eclipse is written mostly in Java and its primary use is for
developing Java applications.
6- What is meant by WAR file?
The WAR file is a standard format for web applications that has specific directories and
specific files. This includes a WEB-INF directory, a WEB-INF/web.xml file used to
describe the application, a WEB-INF/lib directory for JAR files used by the
application.
7-Define web application directory structure?
It consists of a structured hierarchy of directories.
The root directory, The Web-Inf directory, classes directory, lib folder are included in it.

Long Questions:
1-Describe web application directory structure?

Chapter#3
1-HTML document consists on how much parts? briefly explain
An HTML document has two main parts: the head and the body. The HEAD of an HTML
document is where information (which might be ignored by some Web browsers), such as
the document's title, can be placed.
The BODY of an HTML document is where all the information you wish to view must
appear. Such as <p>,<img>
2-write simple “ Hello world” example in HTML?
<html>
<head>
<title>
A Simple HTML Document </title>
</head>
<body>
<p>This is a very simple HTML document</p>
<p>”Hello world” </p>
</body> </html>

3-Define Inline css with example?


An inline CSS is used to apply a unique style to a single HTML element.
<h1 style="color:blue;">This is a Blue Heading</h1>

4- Define Internal css with example?


An internal CSS is used to define a style for a single HTML page.
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>

5-Define external css with example?


With an external style sheet, you can change the look of an entire web site, by changing
one file
<head>
<link rel="stylesheet" href="styles.css">
</head>

6-How to add external reference in HTML document?

External style sheets can be referenced with a full URL or with a path relative to the current
web page.

This example uses a full URL to link to a style sheet:

Example<link rel="stylesheet" href="https://www.w3schools.com/html/styles.css">

7-Why we use css?

CSS is used to define styles for your web pages, including the design, layout and variations
in display for different devices and screen sizes.

8-Define an HTML Table?

The HTML tables allow web authors to arrange data like text, images, links, other tables,
etc. into rows and columns of cells.

An HTML table is defined with the <table> tag.


9-Define HTML Form?

HTML Forms are required, when you want to collect some data from the site
visitor. For example, during user registration you would like to collect
information such as name, email address, credit card, etc .

10-Define CSS Fonts & CSS border?

The CSS color property defines the text color to be used.


The CSS font-family property defines the font to be used.
The CSS font-size property defines the text size to be used.
The CSS border property defines a border around an HTML element:

p {
    border: 1px solid powderblue;
}

11-write down document structure tags?

Web pages have two basic containers: the head and the body:

 the <head> tag, which contains information, or metadata, about the web page, such


as a title for the page, javascripts, styles (CSS), meta information, and more.
Whatever is inside the <head> tag does not display on the web page itself.
 the <body> tag, containing the content that actually displays in a browser

12-write down page structure tags?

<p>...</p> paragraph: starts a new line with an empty line inserted


<br /> line break: starts a new line with no extra line inserted; a "self-closing" tag
Also (for use with CSS, or cascading stylesheets):
<div>...</div> division: enables you do designate sections of text for styling; will
insert an extra line
<span>...</span> span: enables you to designate sections of text for styling without
inserting any extra space.

13-write down alignment tags?

<center>...</center> centers text and images


<blockquote>...</blockquote> indents text from the left margin
14-Define Horizontal rule?

The Thematic Break (Horizontal Rule) element

The <hr> HTML element represents a thematic break between paragraph-level elements

Long Questions:
1-Describe HTML document structure with example? Write some important HTML tags
used in HTML document?

2-what is CSS? Describe the ways to add CSS in HTML document?

3-Describe HTML Table with example?

4-Describe HTML Form with example?

Chapter#4

1-write down the uses of javascript language?


It is primarily used to enhance web pages to provide for a more user friendly experience.
These include dynamically updating web pages, user interface enhancements such as
menus and dialog boxes, animations, 2D and 3D graphics, interactive maps, video players,
and more.
2-write an example of javascript language?
<script>
document.getElementById("demo").innerHTML = "My First JavaScript";
</script>

3-How many methods to show elements using Javascript?


There are three methods to show elements :
 showing Elements Using Element Id
 showing Elements Using Tag Name
 showing Elements Using class
4-How many methods to hide elements using javascript?
 Hiding Elements Using Element Id
 Hiding Elements Using Tag Name
 Hiding Elements Using class
5-How to apply style on elements using javascript?
The HTML DOM (document object model: API)allows JavaScript to change the style of HTML
elements. To change the style of an HTML element, use this syntax:
document.getElementById(id).style.property = new style
6-Define JQuery?
JQuery is a JavaScript library that allows web developers to add extra functionality to their
websites. It is open source and provided for free under the MIT license.
7-Define JQuery selectors?
jQuery selectors are one of the most important parts of the jQuery library. jQuery selectors
allow you to select and manipulate HTML element(s).jQuery selectors are used to "find" (or
select) HTML elements based on their name, id, classes, types, attributes, values of
attributes and much more. All selectors in jQuery start with the dollar sign and parentheses:
$().

Long Questions:
1-Describe How to apply styles on elements using javascript?
2-Describe JQuery & JQuery Selectors in detail?
3-Describe How to apply validation on HTML Form using javascript?
4-what is javascript?what can javascript do ?how to hide and show elements
using JS?
Chapter#5

1-Define Servlet?
Servlet is a technology which is used to create a web application. It uses java language.
Servlet is an API that provides many interfaces and classes including documentation.
2-write any two advantages of servlet?
Servlet enables easy portability across Web Servers.
Servlet can communicate with different servlet and servers.

3-Briefly describe servlet types?


There are two main servlet types, Generic and HTTP:
Generic servlets : Extend javax.servlet.GenericServlet.
HTTP servlets: Extend javax.servlet.HttpServlet.

4-Briefly describe servlet life cycle?


The web container maintains the life cycle of a servlet instance. The life cycle of the servlet
consists of following steps:
1. Servlet class is loaded.
2. Servlet instance is created.
3. init method is invoked.
4. service method is invoked.
5. destroy method is invoked.

Long Questions:
1-Define Servlet and Describe Servlet life cycle?
2-Describe servlet advantages and its Types?
3-Write Basic “HELLO WORLD” servlet?
Chapter#6

1-Define JSP (Java server page)?


 It stands for Java Server Pages.
 It is a server side technology.
 It is used for creating web application.
 It is used to create dynamic web content.

2-write any 03 features of JSP?


 Coding in JSP is easy 
 Reduction in the length of Code
 Connection to Database is easier 

3-write any 02 advantages of JSP?


 It does not require advanced knowledge of JAVA
 It is capable of handling exceptions

4-write any 02 disadvantages of JSP?


 Difficult to debug for errors.
 First time access leads to wastage of time

5-write steps of JSP life cycle?

1. Translation
2. Compilation
3. Loading
4. Instantiation
5. Initialization
6. RequestProcessing
7. Destruction

6-Enlist elements of JSP?


1-The scriptlet
2-JSP Declarations
3-JSP Expressions
4-JSP Comments
5-JSP Directives
6-JSP actions
7-Enlist standard actions of JSP?
1-JSP:Include action
2-JSP:useBean action
3-JSP:Forward action
4-JSP:plugin action

Long Questions:
1- Describe JSP life cycle?
2- Describe Elements of JSP?
3- Describe Standard actions of JSP?

Chapter#7

1-Define session management?


Session Management is a mechanism used by the Web container to store session
information for a particular user. There are four different techniques used by Servlet
application for session management. They are as follows:

1. Cookies
2. Hidden form field
3. URL Rewriting
4. HttpSession

2-Define a Cookie?
Cookies are small pieces of information that are sent in response from the web server to
the client. Cookies are the simplest technique used for storing client state.
Cookies are stored on client's computer. They have a lifespan and are destroyed by the
client browser at the end of that lifespan.

3-Define a Session?

Sessions are server-side files that contain user data.


When the user quits the browser or logs out of the programmed, the session is
over.

It can hold an indefinite quantity of data.

4-what is HTTP Session?

HttpSession object is used to store entire session with a specific client. We can store,
retrieve and remove attribute from HttpSession object. Any servlet can have access
to HttpSession object throughout the getSession() method of
the HttpServletRequest object

5-what is URL rewriting?

If the client has disabled cookies in the browser then session management using cookie
wont work. In that case URL Rewriting can be used as a backup. URL rewriting will always
work.
In URL rewriting, a token(parameter) is added at the end of the URL. The token consist of
name/value pair seperated by an equal(=) sign.

Long Questions:
1-Describe Session Management and its techniques?
2-Describe Hidden form field for session management?
3-Describe URL rewriting for session management?

Chapter#8

1-what is API?
API (Application programming interface) is a document that contains a description of all
the features of a product or software. It represents classes and interfaces that software
programs can follow to communicate with each other.
2-What is JDBC?
JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and execute the
query with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC
drivers to connect with the database.
3-Define execute query method?
This method is used to execute statements that returns tabular data (example select). It
returns an object of the class ResultSet.
5-Define execute update method?
The executeUpdate() method returns the number of rows affected by the SQL
statement (an INSERT typically affects one row, but an UPDATE or DELETE statement can
affect more).

Long Questions:
1-Describe the connection to the database in JDBC programming and how to access
database?

Chapter#9
1-what is a custom Tag?
A custom tag is a user-defined JSP language element. When a JSP page containing a custom
tag is translated into a servlet, the tag is converted to operations on a tag handler.
2-what is custom Tag handlers?
When a JSP page containing a custom tag is translated into a servlet, the tag is converted to
operations on an object called a tag handler.
3-write Tag handler example?
package com.myexamcloud.taghandler;
 
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;
import java.io.*;
 
public class UserProfileTag extends SimpleTagSupport {
 
public void doTag() throws JspException, IOException {
JspWriter out = getJspContext().getOut();
// Logic to display logged in user profile details here
}
}

4-Define JSP fragment?


A JSP fragment is a portion of JSP code passed to a tag handler that can be invoked as many
times as needed.

Long Questions:
1-what is custom tag? describe customize tag behaviour with attributes?
2-Describe Tag handler with example?

Chapter#10

1-Define JSF (java server faces)?


Java Server Faces (JSF) is a Java-based web application framework intended to simplify
development integration of web-based user interfaces. JavaServer Faces is a standardized
display technology, which was formalized in a specification through the Java Community
Process.

2-Enlist phases of JSF life cycle?

 Restore view phase


 Apply request values phase; process events
 Process validations phase; process events
 Update model values phase; process events
 Invoke application phase; process events
 Render response phase
3-what is event handling?
When a user clicks a JSF button or link or changes any value in the text field, JSF UI
component fires an event, which will be handled by the application code. To handle such
an event, an event handler is to be registered in the application code or managed bean.
When a UI component checks that a user event has occured, it creates an instance of the
corresponding event class and adds it to an event list
4-what are JSF Tag libraries?
To develop an JSF application in an convenient way Sun Microsystems, Inc provided some
tag libraries that fulfils the basic requirement or functionality to the discrete JSF
applications.

JSF core
JSF html
JSF composite
JSF ui
JSTL core
JSTL functions

5-Difference b/w JSF & JSP?


JSP primarily developed for creating dynamic web pages for small aplications.
It is very difficult to use for large-scale applications as they are developed with a certain
framework and component based system
On the other hand JSF is a component based system which is highly useful for large scale
projects.JSF uses MVC framework,even the user interfaces & its components are reusable
in a particular web page.

Long Questions:
1-what is JSF ?Describe JSF Life cycle?
2-what is event handling?describe some event handlers?
3-Describe JSF Tag Libraries?

Prepared by: Saba Raza Instructor IT

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy