SlideShare a Scribd company logo
1 of 14
Dynamic Web Pages In Java: How To
Create Web Pages In Java?
Website
 Website is a collection of related web pages that
may contain text, images, audio and video. The
first page of a website is called home page. Each
website has specific internet address (URL) that
you need to enter in your browser to access a
website.
 Website is hosted on one or more servers and
can be accessed by visiting its homepage using a
computer network. A website is managed by its
owner that can be an individual, company or an
organization
Static website
 Static website is the basic type of website that is
easy to create. You don't need the knowledge of web
programming and database design to create a static
website. Its web pages are coded in HTML.
 The codes are fixed for each page so the information
contained in the page does not change and it looks
like a printed page.
Dynamic website
 Dynamic website is a collection of dynamic web pages whose
content changes dynamically. It accesses content from a
database or Content Management System (CMS). Therefore,
when you alter or update the content of the database, the
content of the website is also altered or updated.
 Dynamic website uses client-side scripting or server-side
scripting, or both to generate dynamic content.
 Client side scripting generates content at the client computer
on the basis of user input. The web browser downloads the
web page from the server and processes the code within the
page to render information to the user.
 In server side scripting, the software runs on the server and
processing is completed in the server then plain pages are
sent to the user.
Static vs Dynamic website
Static Website Dynamic Website
Prebuilt content is same every time the page
is loaded.
Content is generated quickly and changes
regularly.
It uses the HTML code for developing a
website.
It uses the server side languages such
as PHP,SERVLET, JSP, and ASP.NET etc.
for developing a website.
It sends exactly the same response for every
request.
It may generate different HTML for each of
the request.
The content is only changed when someone
publishes and updates the file (sends it to the
web server).
The page contains "server-side" code which
allows the server to generate the unique
content when the page is loaded.
Flexibility is the main advantage of static
website.
Content Management System (CMS) is the
main advantage of dynamic website.
Dynamic Web Pages
 Dynamic web pages are server-side web pages, each
time it is viewed, we see different content.It is controlled
by Application server processing server-side scripts. The
dynamic web pages can also change their contents on
the request of the client. They have the capability to
generate new content according to time and need. Which
simply means that dynamic web pages are never the
same for all users.
 We all are well aware of the need for dynamic web pages
in day to day life.
 The best example of a dynamic web page we always see
is captcha.
 The main difference between static and dynamic web
pages is that static web page remains the same for all
clients or users while dynamic web page changes itself
according to the time and as per the user’s request.
Servlets
 In Java, a servlet is a way to create those
dynamic web pages. Servlets are nothing but the
java programs. In Java, a servlet is a type of java
class which runs on JVM(java virtual machine) on
the server side. Java servlets works on server
side.Java servlets are able to handle large and
complex problems and requests by users.
 Let us move further with dynamic web pages in
java
What is a web server?
 A web server is used to transfer data in the form
of the HTTP protocol. The client just has to type
the URL in a browser and the web server
provides her/him the required web page to read.
So, how it works..? What a web server does
inside?
 The web server converts the client typed URL into
the HTTP protocol in order to respond to the
request and with the help of Servlets, it serves
the client’s request.
Properties of servlets
 Servlets work on server side extensions to handle
the complex problems.
 Servlets covers all the limitations of CGI.
What is CGI?
 CGI (common gateway interface), is an application
which is used to produce dynamic contents of web
pages. Common gateway interface can be created by
using any programming language like c,c++, etc.
 While using CGI, when client request anything, the
web server performs the following tasks sequentially:-
 It receives the request and the required CGI.
 It generates a new process and calls the required CGI
application.
 CGI generates the output and after getting the
information of the request made by the client.
 It sends the output(response) to the web server and
destroys the process.
 Web server displays it on client’s screen.
Servlets are cheaper than CGI and are capable to handle cookies.
The java servlet follows a simple process, showing by the below
block diagram:-
Steps
 A client sends the request to a web server.
 The web server receives the request from client.
 Servlets receives the request.
 Servlets process the request and produce the
output.
 Servlet sends the output to the web server.
 A web server sends it to the client’s browser and
browser display it on the client’s screen.
 There are two packages by which servlets can build
javax.servlet(Basic)
javax.servlet.http(Advance)
Advantages of Servlets
 They are platform independent.
 They are cheaper than CGI.
 They are capable to handle cookies.
 They overcome the limitations of CGI.
 NO need to create new process for any request.
 As it is server-side application, it can inherit the
security from a web server.
What is servlet container
 Users did not have the facility to request and
access the static pages but dynamic also, where
dynamic web pages can work differently each
time for different inputs and according to the time.
 A servlet container is nothing but a concept or
idea to use them
Dynamic web pages in java

More Related Content

What's hot

Introduction to RAID (Redundant Array of Independent Disks)
Introduction to RAID (Redundant Array of Independent Disks)Introduction to RAID (Redundant Array of Independent Disks)
Introduction to RAID (Redundant Array of Independent Disks)
Raid Data Recovery
 
Hadoop Architecture | HDFS Architecture | Hadoop Architecture Tutorial | HDFS...
Hadoop Architecture | HDFS Architecture | Hadoop Architecture Tutorial | HDFS...Hadoop Architecture | HDFS Architecture | Hadoop Architecture Tutorial | HDFS...
Hadoop Architecture | HDFS Architecture | Hadoop Architecture Tutorial | HDFS...
Simplilearn
 

What's hot (20)

Java J2EE
Java J2EEJava J2EE
Java J2EE
 
Introduction to RAID (Redundant Array of Independent Disks)
Introduction to RAID (Redundant Array of Independent Disks)Introduction to RAID (Redundant Array of Independent Disks)
Introduction to RAID (Redundant Array of Independent Disks)
 
HBase.pptx
HBase.pptxHBase.pptx
HBase.pptx
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
 
Apache HBase™
Apache HBase™Apache HBase™
Apache HBase™
 
HDFS Design Principles
HDFS Design PrinciplesHDFS Design Principles
HDFS Design Principles
 
PPT on Hadoop
PPT on HadoopPPT on Hadoop
PPT on Hadoop
 
Activation function
Activation functionActivation function
Activation function
 
Classification Algorithm.
Classification Algorithm.Classification Algorithm.
Classification Algorithm.
 
Elhabian lda09
Elhabian lda09Elhabian lda09
Elhabian lda09
 
Introduction to MERN Stack
Introduction to MERN StackIntroduction to MERN Stack
Introduction to MERN Stack
 
Hadoop Overview & Architecture
Hadoop Overview & Architecture  Hadoop Overview & Architecture
Hadoop Overview & Architecture
 
Document Database
Document DatabaseDocument Database
Document Database
 
Big Data technology Landscape
Big Data technology LandscapeBig Data technology Landscape
Big Data technology Landscape
 
Activation functions and Training Algorithms for Deep Neural network
Activation functions and Training Algorithms for Deep Neural networkActivation functions and Training Algorithms for Deep Neural network
Activation functions and Training Algorithms for Deep Neural network
 
Parallel SQL and Streaming Expressions in Apache Solr 6
Parallel SQL and Streaming Expressions in Apache Solr 6Parallel SQL and Streaming Expressions in Apache Solr 6
Parallel SQL and Streaming Expressions in Apache Solr 6
 
Hadoop Architecture | HDFS Architecture | Hadoop Architecture Tutorial | HDFS...
Hadoop Architecture | HDFS Architecture | Hadoop Architecture Tutorial | HDFS...Hadoop Architecture | HDFS Architecture | Hadoop Architecture Tutorial | HDFS...
Hadoop Architecture | HDFS Architecture | Hadoop Architecture Tutorial | HDFS...
 
Servlets
ServletsServlets
Servlets
 
Artificial Neural Network Tutorial | Deep Learning With Neural Networks | Edu...
Artificial Neural Network Tutorial | Deep Learning With Neural Networks | Edu...Artificial Neural Network Tutorial | Deep Learning With Neural Networks | Edu...
Artificial Neural Network Tutorial | Deep Learning With Neural Networks | Edu...
 
data science chapter-4,5,6
data science chapter-4,5,6data science chapter-4,5,6
data science chapter-4,5,6
 

Similar to Dynamic web pages in java

Websphereinterview 100725022705-phpapp02
Websphereinterview 100725022705-phpapp02Websphereinterview 100725022705-phpapp02
Websphereinterview 100725022705-phpapp02
kishore2526
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
backdoor
 

Similar to Dynamic web pages in java (20)

Presentation on java servlets
Presentation on java servletsPresentation on java servlets
Presentation on java servlets
 
Websphere interview Questions
Websphere interview QuestionsWebsphere interview Questions
Websphere interview Questions
 
Static dynamic and active web pages
Static dynamic and active web pagesStatic dynamic and active web pages
Static dynamic and active web pages
 
single page application
single page applicationsingle page application
single page application
 
Application server vs Web Server
Application server vs Web ServerApplication server vs Web Server
Application server vs Web Server
 
Server side programming
Server side programming Server side programming
Server side programming
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
 
Servlet by Rj
Servlet by RjServlet by Rj
Servlet by Rj
 
Websphereinterview 100725022705-phpapp02
Websphereinterview 100725022705-phpapp02Websphereinterview 100725022705-phpapp02
Websphereinterview 100725022705-phpapp02
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
 
WEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptxWEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptx
 
Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)
 
Java Training Ahmedabad , Introduction of java web development
Java Training Ahmedabad , Introduction of java web developmentJava Training Ahmedabad , Introduction of java web development
Java Training Ahmedabad , Introduction of java web development
 
Server and Client side comparision
Server and Client side comparisionServer and Client side comparision
Server and Client side comparision
 
Ecom 1
Ecom 1Ecom 1
Ecom 1
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
Webapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh guptaWebapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh gupta
 
Single page applications with backbone js
Single page applications with backbone jsSingle page applications with backbone js
Single page applications with backbone js
 
Single Page Apps
Single Page AppsSingle Page Apps
Single Page Apps
 

More from vishal choudhary

More from vishal choudhary (20)

SE-Lecture1.ppt
SE-Lecture1.pptSE-Lecture1.ppt
SE-Lecture1.ppt
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
 
SE-CyclomaticComplexityand Testing.ppt
SE-CyclomaticComplexityand Testing.pptSE-CyclomaticComplexityand Testing.ppt
SE-CyclomaticComplexityand Testing.ppt
 
SE-Lecture-7.pptx
SE-Lecture-7.pptxSE-Lecture-7.pptx
SE-Lecture-7.pptx
 
Se-Lecture-6.ppt
Se-Lecture-6.pptSe-Lecture-6.ppt
Se-Lecture-6.ppt
 
SE-Lecture-5.pptx
SE-Lecture-5.pptxSE-Lecture-5.pptx
SE-Lecture-5.pptx
 
XML.pptx
XML.pptxXML.pptx
XML.pptx
 
SE-Lecture-8.pptx
SE-Lecture-8.pptxSE-Lecture-8.pptx
SE-Lecture-8.pptx
 
SE-coupling and cohesion.ppt
SE-coupling and cohesion.pptSE-coupling and cohesion.ppt
SE-coupling and cohesion.ppt
 
SE-Lecture-2.pptx
SE-Lecture-2.pptxSE-Lecture-2.pptx
SE-Lecture-2.pptx
 
SE-software design.ppt
SE-software design.pptSE-software design.ppt
SE-software design.ppt
 
SE1.ppt
SE1.pptSE1.ppt
SE1.ppt
 
SE-Lecture-4.pptx
SE-Lecture-4.pptxSE-Lecture-4.pptx
SE-Lecture-4.pptx
 
SE-Lecture=3.pptx
SE-Lecture=3.pptxSE-Lecture=3.pptx
SE-Lecture=3.pptx
 
Multimedia-Lecture-Animation.pptx
Multimedia-Lecture-Animation.pptxMultimedia-Lecture-Animation.pptx
Multimedia-Lecture-Animation.pptx
 
MultimediaLecture5.pptx
MultimediaLecture5.pptxMultimediaLecture5.pptx
MultimediaLecture5.pptx
 
Multimedia-Lecture-7.pptx
Multimedia-Lecture-7.pptxMultimedia-Lecture-7.pptx
Multimedia-Lecture-7.pptx
 
MultiMedia-Lecture-4.pptx
MultiMedia-Lecture-4.pptxMultiMedia-Lecture-4.pptx
MultiMedia-Lecture-4.pptx
 
Multimedia-Lecture-6.pptx
Multimedia-Lecture-6.pptxMultimedia-Lecture-6.pptx
Multimedia-Lecture-6.pptx
 
Multimedia-Lecture-3.pptx
Multimedia-Lecture-3.pptxMultimedia-Lecture-3.pptx
Multimedia-Lecture-3.pptx
 

Recently uploaded

Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 

Dynamic web pages in java

  • 1. Dynamic Web Pages In Java: How To Create Web Pages In Java?
  • 2. Website  Website is a collection of related web pages that may contain text, images, audio and video. The first page of a website is called home page. Each website has specific internet address (URL) that you need to enter in your browser to access a website.  Website is hosted on one or more servers and can be accessed by visiting its homepage using a computer network. A website is managed by its owner that can be an individual, company or an organization
  • 3. Static website  Static website is the basic type of website that is easy to create. You don't need the knowledge of web programming and database design to create a static website. Its web pages are coded in HTML.  The codes are fixed for each page so the information contained in the page does not change and it looks like a printed page.
  • 4. Dynamic website  Dynamic website is a collection of dynamic web pages whose content changes dynamically. It accesses content from a database or Content Management System (CMS). Therefore, when you alter or update the content of the database, the content of the website is also altered or updated.  Dynamic website uses client-side scripting or server-side scripting, or both to generate dynamic content.  Client side scripting generates content at the client computer on the basis of user input. The web browser downloads the web page from the server and processes the code within the page to render information to the user.  In server side scripting, the software runs on the server and processing is completed in the server then plain pages are sent to the user.
  • 5. Static vs Dynamic website Static Website Dynamic Website Prebuilt content is same every time the page is loaded. Content is generated quickly and changes regularly. It uses the HTML code for developing a website. It uses the server side languages such as PHP,SERVLET, JSP, and ASP.NET etc. for developing a website. It sends exactly the same response for every request. It may generate different HTML for each of the request. The content is only changed when someone publishes and updates the file (sends it to the web server). The page contains "server-side" code which allows the server to generate the unique content when the page is loaded. Flexibility is the main advantage of static website. Content Management System (CMS) is the main advantage of dynamic website.
  • 6. Dynamic Web Pages  Dynamic web pages are server-side web pages, each time it is viewed, we see different content.It is controlled by Application server processing server-side scripts. The dynamic web pages can also change their contents on the request of the client. They have the capability to generate new content according to time and need. Which simply means that dynamic web pages are never the same for all users.  We all are well aware of the need for dynamic web pages in day to day life.  The best example of a dynamic web page we always see is captcha.  The main difference between static and dynamic web pages is that static web page remains the same for all clients or users while dynamic web page changes itself according to the time and as per the user’s request.
  • 7. Servlets  In Java, a servlet is a way to create those dynamic web pages. Servlets are nothing but the java programs. In Java, a servlet is a type of java class which runs on JVM(java virtual machine) on the server side. Java servlets works on server side.Java servlets are able to handle large and complex problems and requests by users.  Let us move further with dynamic web pages in java
  • 8. What is a web server?  A web server is used to transfer data in the form of the HTTP protocol. The client just has to type the URL in a browser and the web server provides her/him the required web page to read. So, how it works..? What a web server does inside?  The web server converts the client typed URL into the HTTP protocol in order to respond to the request and with the help of Servlets, it serves the client’s request.
  • 9. Properties of servlets  Servlets work on server side extensions to handle the complex problems.  Servlets covers all the limitations of CGI.
  • 10. What is CGI?  CGI (common gateway interface), is an application which is used to produce dynamic contents of web pages. Common gateway interface can be created by using any programming language like c,c++, etc.  While using CGI, when client request anything, the web server performs the following tasks sequentially:-  It receives the request and the required CGI.  It generates a new process and calls the required CGI application.  CGI generates the output and after getting the information of the request made by the client.  It sends the output(response) to the web server and destroys the process.  Web server displays it on client’s screen.
  • 11. Servlets are cheaper than CGI and are capable to handle cookies. The java servlet follows a simple process, showing by the below block diagram:- Steps  A client sends the request to a web server.  The web server receives the request from client.  Servlets receives the request.  Servlets process the request and produce the output.  Servlet sends the output to the web server.  A web server sends it to the client’s browser and browser display it on the client’s screen.  There are two packages by which servlets can build javax.servlet(Basic) javax.servlet.http(Advance)
  • 12. Advantages of Servlets  They are platform independent.  They are cheaper than CGI.  They are capable to handle cookies.  They overcome the limitations of CGI.  NO need to create new process for any request.  As it is server-side application, it can inherit the security from a web server.
  • 13. What is servlet container  Users did not have the facility to request and access the static pages but dynamic also, where dynamic web pages can work differently each time for different inputs and according to the time.  A servlet container is nothing but a concept or idea to use them