Professional Documents
Culture Documents
Unit 1
Unit 1
Mission
Subject: Web
Web Technology
Technology
Course Outcome
CO 5 Building enterprise level applications and manipulate web databases using JDBC K3, K4
CO6 Design interactive web applications using Servlets and JSP K2, K3
Subject:Web
Subject: Web Technology
Technology
Syllabus
Unit-1
Introduction: Introduction and Web Development Strategies, History of Web and Internet, Protocols Governing Web, Writing Web Projects, Connecting to
Internet, Introduction to Internet services and tools, Introduction to client-server computing. Core Java: Introduction, Operator, Data type, Variable, Arrays,
Methods & Classes, Inheritance, Package and Interface, Exception Handling, Multithread programming, I/O, Java Applet, String handling, Event handling,
Introduction to AWT, AWT controls, Layout managers
Unit-2
Web Page Designing: HTML: List, Table, Images, Frames, forms, CSS, Document type definition, XML: DTD, XML schemes, Object Models, presenting and
using XML, Using XML Processors: DOM and SAX, Dynamic HTML
Unit-3
Scripting: Java script: Introduction, documents, forms, statements, functions, objects; introduction to AJAX, Networking : Internet Addressing,
InetAddress, Factory Methods, Instance Methods, TCP/IP Client Sockets, URL, URL Connection, TCP/IP Server Sockets, Datagram.
Unit-4
Enterprise Java Bean: Preparing a Class to be a JavaBeans, Creating a JavaBeans, JavaBeans Properties, Types of beans, Stateful Session bean, Stateless
Session bean, Entity bean
Java Database Connectivity (JDBC): Merging Data from Multiple Tables: Joining, Manipulating, Databases with JDBC, Prepared Statements,
Transaction Processing, Stored Procedures.
Unit-5
Servlets: Servlet Overview and Architecture, Interface Servlet and the Servlet Life Cycle, Handling HTTP get Requests, Handling HTTP post
Requests, Redirecting Requests to Other Resources, Session Tracking, Cookies, Session Tracking with Http Session
Java Server Pages (JSP): Introduction, Java Server Pages Overview, A First Java Server Page Example, Implicit Objects, Scripting, Standard Actions,
Directives, Custom Tag Libraries..
Subject:Web
Subject: Web Technology
Technology
Web Development Strategies
Web development strategies refer to the approaches and plans that developers use to design, build, and
maintain websites or web applications. These strategies encompass various aspects of the development
process, including project planning, design, coding, testing, deployment, and ongoing maintenance.
ARPANET
Networking project by
Pentagon’s Advanced
Research Projects
Goal: Agency (ARPA) Goal:
To allow scientists at To function if
different locations to part of network
share information were disabled
Became
functional
September 1969
Subject:
p. 69 Web Technology
History of the Internet
Slow-speed High-speed
technology connection
Subject:
p. 70 Web Technology Next
The World Wide Web
What is a Web browser?
Program that allows you to view Web pages
Opera Safari
An ISO standard that covers all aspects of network communications is the Open Systems
Interconnection (OSI) model. It was first introduced in the late 1970s.
25
Subject: Web Technology
Protocol Governing Web
Protocol is a set of rules that used to communicate application to each other. OR a protocol is a interface
required for communicating the different application.
Few protocols are discussed bellow:
a. HTTP
b. ICMP
c. TCP/IP
d. UDP
e. FTP
f. SMTP
HTTP:
HTTP stands for HyperText Transfer Protocol.
HTTP is the primary protocol used to distribute information on the web. It
is a protocol used to access the data on the World Wide Web (www).
The HTTP protocol can be used to transfer the data in the form of plain
text, hypertext, audio, video, and so on.
HTTP functions as a request response protocol in the client server
computing model.
TCP
It is a transport layer protocol.
TCP stands for Transmission control protocol.
It is one of the main protocol in TCP/IP network where IP protocol deals with packet.
TCP enables two hosts to establish a connection and exchange streams of data.
TCP guarantees delivery of data and also guarantee that packet will be delivered in the same order in
which they were sent.
TCP is connection oriented and reliable transport layer protocol.
FTP
• FTP stands for File transfer protocol.
• FTP is a standard internet protocol provided by TCP/IP used for transmitting the files from one host to
• another.
• It is also used for downloading the files to computer from other servers
Objective of FTP
• It provides the sharing of files.
• It is used to encourage the use of remote computers.
• It transfers the data more reliably and efficiently.
SMTP is a set of communication guidelines that allow software to transmit an electronic mail over the
internet is called Simple Mail Transfer Protocol.
It is a program used for sending messages to other computer users based on e-mail addresses
4 Internet Relay Chat (IRC) : Allows the people from all over the world to communicate in real time.
5 Mailing Lists : Used to organize group of internet users to share common information through e-mail.
6 Internet Telephony (VoIP) : Allows the internet users to talk across internet to any PC equipped to receive the call.
7 Instant Messaging : Offers real time chat between individuals and group of people. Eg. Yahoo messenger, MSN messenger.
2 Archie : It’s updated database of public FTP sites and their content. It helps to search a file by its name.
What is e-mail?
Short for electronic mail
The transmission of messages and files via a computer network
Messages can consist of simple text or can contain attachments, such as documents,
graphics, or audio/video clips
Internet access providers usually provide an e-mail program
Some Web sites—such as Google Gmail, Windows Live Hotmail,
and Yahoo! Mail—provide free e-mail services
One of the original services on the Internet
Subject:
p. 94 Fig. 2-27 Web Technology
Other Internet Services
How does an e-mail message travel?
Step 1. Using e-
mail software, you
create and send
message
Step 2.
Your software contacts
software on your
service provider’s Step 4.
outgoing mail server When recipient uses
e-mail software to check for e-
mail messages, the message
transfers from incoming mail
server to recipient’s computer
Step 3.
Software on outgoing mail server determines best route
for data and sends message, which travels along
Internet routers to recipient’s incoming mail server
What is a chat?
Real-time typed conversation that takes
place on a computer
Chat room is location on server that
permits users to discuss topics of
interest
• In client server computing, a server is a central node that services many client nodes.
On the other hand, in a peer to peer system, the nodes collectively use their resources
and communicate with each other.
• In client server computing the server is the one that communicates with the other
nodes. In peer to peer to computing, all the nodes are equal and share data with each
other directly.
• Client Server computing is believed to be a subcategory of the peer to peer computing
A pricing model for web project does not exist. A pricing model exists for traditional project. Various type of models such as
COCOMO are developed for costing.
Roles of the team members of web project are less specialized. Team roles in traditional project are more specialized.
After finalization of the web project, websites are alive, can be
changed and grow. After completion, changes are not frequent in traditional project.
Cost incurred in the web project during the development of web Clients takes all the expenses related to project such as cost involved in
project is not given by the clients. designing, testing, prototyping, etc.
Project manager in web project has the full responsibility of In traditional projects, various managers at different levels have the
project. responsibility of project development.
Phases:
• There are three execution phases of a program. These are written, compile and run.
• Writing a program is done by a java programmer like you and me.
• The compilation is done by the JAVAC compiler which is a primary Java compiler included in the Java
development kit (JDK). It takes Java program as input and generates bytecode as output.
• In the Run phase of a program, JVM executes the bytecode generated by the compiler.
2. Bytecode in the Development process: As discussed, the Javac compiler of JDK compiles the
java source code into bytecode so that it can be executed by JVM. It is saved as .class file by
the compiler.
3. Java Development Kit (JDK): As the name suggests, it is a complete Java Development Kit
that includes everything including compiler, Java Runtime Environment (JRE), java
debuggers, java docs, etc. For the program to execute in java, we need to install JDK on our
computer in order to create, compile and run the java program.
4. Java Runtime Environment (JRE): JDK includes JRE. JRE installation on our computers allows
the java program to run, however, we cannot compile it. JRE includes a browser, JVM, applet
supports, and plugins. For running the java program, a computer needs JRE.
Goto C++ supports the goto statement. Java doesn't support the goto statement.
C++ supports multiple inheritance. Java doesn't support multiple inheritance through class.
Multiple inheritance It can be achieved by interfaces in java.
Operator C++ supports operator overloading. Java doesn't support operator overloading.
Overloading
C++ supports pointers. You can write pointer program Java supports pointer internally. However, you can't write the pointer
Pointers in C++. program in java. It means java has restricted pointer support in java.
C++ uses compiler only. C++ is compiled and run using Java uses compiler and interpreter both. Java source code is
Compiler and the compiler which converts source code into machine converted into bytecode at compilation time. The interpreter
Interpreter code so, C++ is platform dependent. executes this bytecode at runtime and produces output. Java is
interpreted that is why it is platform independent.
Virtual Keyword C++ supports virtual keyword so that we can Java has no virtual keyword. We can override all non-static
decide whether or not override a function. methods by default. In other words, non-static methods are virtual
by default.
Inheritance Tree C++ creates a new inheritance tree always. Java uses a single inheritance tree always because all classes are
the child of Object class in java. The object class is the root of the
inheritance tree in java.
Object-oriented C++ is an object-oriented language. However, in C Java is also an object-oriented language. However, everything
language, single root hierarchy is not possible. (except fundamental types) is an object in Java. It is a single root
hierarchy as everything gets derived from java.lang.Object.
Operator in Java is a symbol that is used to perform operations. For example: +, -, *, / etc.
There are many types of operators in Java which are given below:
• Unary Operator - ++, --, ~,!
• Arithmetic Operator - >, +,-,%,/,*
• Shift Operator - <<,>>
• Relational Operator - <,>,<=,>=,==
• Bitwise Operator – bitwise OR(|): The bitwise | operator always checks both conditions whether the
first condition is true or false. Bitwise AND(&): The bitwise & operator always checks both conditions
whether the first condition is true or false.
• Logical Operator - &&(AND) operator doesn’t check the second condition if the first condition is false.
It checks the second condition only if the first one is true, ||(OR) operator doesn’t check the second
if the first condition is true. It checks the second condition only if the first one is false.
• Local Variable:
A variable declared inside the body of the method is called a local variable.
Syntax: method() {
datatype variableName; // Local Variable
}
Instance Variable:
• A variable declared inside the class but outside the body of the method, is called an instance
variable. It is not declared static.
• It is called an instance variable because its value is instance-specific and is not shared among
instances.
• Every instance has its own copy of the instance variable.
• Syntax: class {
datatype variablename; // instance variable
}
int result =
_a + $b + C
+ c;
System.out.
Subject: Web Technologyprintln("Res
Comments in Java
Comments
Comments are descriptions of the aim and features of the program Comments. Increase the readability of
a program.
These comments are useful to create an HTML file called API (application programming Interface) document.
This file contains a description of all the features of the software.
Example: A dog is an object because it has states like color, name, breed, etc. as well as behaviors like wagging the tail,
barking, eating, etc.
In Java, the new keyword is used to create new objects.
}
• In general, program execution starts with a main() method, and line-by-line execution of the program
tokens places a linear/Sequential flow of Execution.
PSV main()
{
line1 // Linear Sequential flow of
execution 2
}
}
• In general, program execution starts with a main() method, and line-by-line execution of the program
tokens places a linear/Sequential flow of Execution.
PSV main()
{
line1 // Linear Sequential flow of
execution 2
}
• Types of Method
There are two types of methods in Java:
• Predefined Method
• User-defined Method
Examples of inheritance
• Here, Examples of inheritance are shown in the figure. Programmer is the subclass, and Employee is the
superclass.
• The relationship between the two classes is Programmer IS-A Employee. It means that Programmer is a
type of Employee.
1. class Animal{
2. void eat(){System.out.println("eating...");}
3. }
4. class Dog extends Animal{
5. void bark(){System.out.println("barking...");}
6. }
7. class TestInheritance{
8. public static void main(String args[]){
9. Dog d=new Dog();
10. d.bark();
11.d.eat();
12.}}
Keyword Description
try The "try" keyword is used to specify a block where we should place an exception
code. It means we can't use try block alone. The try block must be followed by
either catch or finally.
catch The "catch" block is used to handle the exception. It must be preceded by try block
which means we can't use catch block alone. It can be followed by finally block
later.
finally The "finally" block is used to execute the necessary code of the program. It is
executed whether an exception is handled or not.
throw The "throw" keyword is used to throw an exception.
The "throws" keyword is used to declare exceptions. It specifies that there may
throws occur an exception in the method. It doesn't throw an exception. It is always used
with method signature.
t
h
a
t
Subject: Web Technology m
Exception Handling inJava(Cont.…)
Throw an exception
•Example creates a subclass of Exception and throws an
exception: class MyException extends Exception { }
class MyClass
{
void oops()
{
if (/* no error occurred */)
{ /* normal processing */ }
else
{ /* error occurred
*/ throw new
MyException(); } }
//oops
}
Subject: Web
//class Technology
MyClass
Multithread in Java
class Demo_print {
public static void main(String[] args)
{
// using print()
// all are printed in the
// same line
System.out.print("GfG! ");
System.out.print("GfG! ");
System.out.print("GfG! ");
}
}
<html>
<body>
<applet code="First.class" width="300" height="300">
</applet>
</body>
</html>
Syntax:
addTypeListener()
• Example 1: For KeyEvent we use addKeyListener() to register.
• Example 2:that For ActionEvent we use addActionListener() to register.
public void setSize(int width,int height) Sets the size (width and height) of the component.
public void setLayout(LayoutManager m) Defines the layout manager for the component.
public void setVisible(boolean status) Changes the visibility of the component, by default
false.