SlideShare a Scribd company logo
JAVA SERVLETS AND CGI
Presented by
M.LAVANYA
M.sc(CS & IT)
Nadar Saraswathi college of arts & science,
Theni.
INTRODUCTION TO SERVLETS
• Servlet Technology is used to create web applications.
• Servlet technology uses Java language to create web
applications.
• Web applications are helper applications that resides at web
server and build dynamic web pages.
• A dynamic page could be anything like a page that randomly
chooses picture to display or even a page that displays the
current time.
As Servlet Technology uses Java, web applications made using
Servlet are Secured, Scalable and Robust.
INTRODUCTION OF CGI
• CGI (Common Gateway Interface) is used to provide dynamic
content to the user.
• CGI is used to execute a program that resides in the server to
process data or access databases to produce the relevant
dynamic content.
• Programs that resides in server can be written in native
operating system such as C++.
DIAGRAMMATIC REPRESENTATION
DIFFERENT OF CGI
Servlet CGI (Common Gateway Interface)
Servlets are portable CGI is not portable.
In Servlets each request is handled by
lightweight Java Thread
IN CGI each request is handled by heavy
weight OS process
In Servlets, Data sharing is possible In CGI, data sharing is not available.
Servlets can link directly to the Web
server
CGI cannot directly link to Web server.
Session tracking and caching of previous
computations can be performed
Session tracking and caching of previous
computations cannot be performed
Automatic parsing and decoding of
HTML form data can be performed.
Automatic parsing and decoding of
HTML form data cannot be performed.
Servlets can read and Set HTTP Headers CGI cannot read and Set HTTP Headers
Servlets can handle cookies CGI cannot handle cookies
Servlets can track sessions CGI cannot track sessions
Servlets is inexpensive than CGI CGI is more expensive than Servlets
CGI (COMMON GATEWAY INTERFACE)
• Before Servlets, CGI(Common Gateway Interface)
programming was used to create web applications. Here's how
a CGI program works :
• User clicks a link that has URL to a dynamic page instead of a
static page.
• The URL decides which CGI program to execute.
• Web Servers run the CGI program in separate OS shell. The
shell includes OS environment and the process to execute code
of the CGI program.
• The CGI response is sent back to the Web Server, which wraps
the response in an HTTP response and send it back to the web
browser.
CGI
DRAWBACKS OF CGI PROGRAMS
• High response time because CGI programs execute in their
own OS shell.
• CGI is not scalable.
• CGI programs are not always secure or object-oriented.
• It is Platform dependent.
SERVLETS
• CGI programs are used to execute programs written inside the
native language. But in Servlet all the programs are compiled
into the Java byte code which is then run in the Java virtual
machine.
• In Servlet, All the requests coming from the Client are
processed with the threads instead of the OS process.
SERVLETS ENGINE
Java servlets and CGI
Ad

More Related Content

What's hot (20)

Notification android
Notification androidNotification android
Notification android
ksheerod shri toshniwal
 
Architecture design in software engineering
Architecture design in software engineeringArchitecture design in software engineering
Architecture design in software engineering
Preeti Mishra
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
Sourabh Sahu
 
Applets in java
Applets in javaApplets in java
Applets in java
Wani Zahoor
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
Prawesh Shrestha
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
Akhil Kaushik
 
Java threads
Java threadsJava threads
Java threads
Prabhakaran V M
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
BG Java EE Course
 
SQLite database in android
SQLite database in androidSQLite database in android
SQLite database in android
Gourav Kumar Saini
 
Android intents
Android intentsAndroid intents
Android intents
Siva Ramakrishna kv
 
Event handling
Event handlingEvent handling
Event handling
swapnac12
 
Packages in java
Packages in javaPackages in java
Packages in java
Elizabeth alexander
 
enterprise java bean
enterprise java beanenterprise java bean
enterprise java bean
Jitender Singh Lodhi
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
Naveen Sihag
 
Delegates and events in C#
Delegates and events in C#Delegates and events in C#
Delegates and events in C#
Dr.Neeraj Kumar Pandey
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
OECLIB Odisha Electronics Control Library
 
Java rmi
Java rmiJava rmi
Java rmi
kamal kotecha
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
Servlets
ServletsServlets
Servlets
Rajkiran Mummadi
 
Java RMI
Java RMIJava RMI
Java RMI
Prajakta Nimje
 

Similar to Java servlets and CGI (20)

Ecom 1
Ecom 1Ecom 1
Ecom 1
Santosh Pandey
 
JAVA
JAVAJAVA
JAVA
rithika858339
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
ADEEBANADEEM
 
WEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptxWEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptx
karthiksmart21
 
Servlet programming
Servlet programmingServlet programming
Servlet programming
Mallikarjuna G D
 
Servlet programming
Servlet programmingServlet programming
Servlet programming
Mallikarjuna G D
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
VMahesh5
 
CGI Seminar.pptxbcfffvghuhgggyuuuyhhhhhy
CGI Seminar.pptxbcfffvghuhgggyuuuyhhhhhyCGI Seminar.pptxbcfffvghuhgggyuuuyhhhhhy
CGI Seminar.pptxbcfffvghuhgggyuuuyhhhhhy
ManjunathaRGowda3
 
Comman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptxComman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptx
JebastinRaj1
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
WebStackAcademy
 
Enterprise Java, Servlet, JDBC and JSP.pdf
Enterprise Java, Servlet, JDBC and JSP.pdfEnterprise Java, Servlet, JDBC and JSP.pdf
Enterprise Java, Servlet, JDBC and JSP.pdf
PokemonSpyk
 
nagavarthini ppt.pptx
nagavarthini ppt.pptxnagavarthini ppt.pptx
nagavarthini ppt.pptx
PooraniBalamurugan3
 
Servlet session 1
Servlet   session 1Servlet   session 1
Servlet session 1
Anuj Singh Rajput
 
Java Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,CoimbatoreJava Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,Coimbatore
Gateway Software Solutions
 
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and VaadinSimple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Jian Wu
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
backdoor
 
Building Rich Internet Applications Using Google Web Toolkit
Building Rich Internet Applications Using  Google Web ToolkitBuilding Rich Internet Applications Using  Google Web Toolkit
Building Rich Internet Applications Using Google Web Toolkit
rajivmordani
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and Architecture
Tyto Software
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
ADEEBANADEEM
 
WEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptxWEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptx
karthiksmart21
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
VMahesh5
 
CGI Seminar.pptxbcfffvghuhgggyuuuyhhhhhy
CGI Seminar.pptxbcfffvghuhgggyuuuyhhhhhyCGI Seminar.pptxbcfffvghuhgggyuuuyhhhhhy
CGI Seminar.pptxbcfffvghuhgggyuuuyhhhhhy
ManjunathaRGowda3
 
Comman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptxComman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptx
JebastinRaj1
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
WebStackAcademy
 
Enterprise Java, Servlet, JDBC and JSP.pdf
Enterprise Java, Servlet, JDBC and JSP.pdfEnterprise Java, Servlet, JDBC and JSP.pdf
Enterprise Java, Servlet, JDBC and JSP.pdf
PokemonSpyk
 
Java Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,CoimbatoreJava Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,Coimbatore
Gateway Software Solutions
 
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and VaadinSimple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Jian Wu
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
backdoor
 
Building Rich Internet Applications Using Google Web Toolkit
Building Rich Internet Applications Using  Google Web ToolkitBuilding Rich Internet Applications Using  Google Web Toolkit
Building Rich Internet Applications Using Google Web Toolkit
rajivmordani
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and Architecture
Tyto Software
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
Ad

More from lavanya marichamy (17)

Digital video
Digital videoDigital video
Digital video
lavanya marichamy
 
Network design consideration
Network design considerationNetwork design consideration
Network design consideration
lavanya marichamy
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithm
lavanya marichamy
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
lavanya marichamy
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specification
lavanya marichamy
 
Data mining primitives
Data mining primitivesData mining primitives
Data mining primitives
lavanya marichamy
 
Memory Management
Memory ManagementMemory Management
Memory Management
lavanya marichamy
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimization
lavanya marichamy
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Design
lavanya marichamy
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
lavanya marichamy
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
lavanya marichamy
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transaction
lavanya marichamy
 
Pointer in c
Pointer in cPointer in c
Pointer in c
lavanya marichamy
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
lavanya marichamy
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formats
lavanya marichamy
 
IEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LANIEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LAN
lavanya marichamy
 
Broadband isdn and atm
Broadband  isdn and atmBroadband  isdn and atm
Broadband isdn and atm
lavanya marichamy
 
Network design consideration
Network design considerationNetwork design consideration
Network design consideration
lavanya marichamy
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithm
lavanya marichamy
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
lavanya marichamy
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specification
lavanya marichamy
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimization
lavanya marichamy
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Design
lavanya marichamy
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
lavanya marichamy
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transaction
lavanya marichamy
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
lavanya marichamy
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formats
lavanya marichamy
 
Ad

Recently uploaded (20)

Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
Dr. Nasir Mustafa
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE  BY sweety Tamanna Mahapatra MSc PediatricAPGAR SCORE  BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
SweetytamannaMohapat
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
How to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 SalesHow to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 Sales
Celine George
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
*"The Segmented Blueprint: Unlocking Insect Body Architecture"*.pptx
*"The Segmented Blueprint: Unlocking Insect Body Architecture"*.pptx*"The Segmented Blueprint: Unlocking Insect Body Architecture"*.pptx
*"The Segmented Blueprint: Unlocking Insect Body Architecture"*.pptx
Arshad Shaikh
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
Dr. Nasir Mustafa
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE  BY sweety Tamanna Mahapatra MSc PediatricAPGAR SCORE  BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
SweetytamannaMohapat
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
How to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 SalesHow to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 Sales
Celine George
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
*"The Segmented Blueprint: Unlocking Insect Body Architecture"*.pptx
*"The Segmented Blueprint: Unlocking Insect Body Architecture"*.pptx*"The Segmented Blueprint: Unlocking Insect Body Architecture"*.pptx
*"The Segmented Blueprint: Unlocking Insect Body Architecture"*.pptx
Arshad Shaikh
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 

Java servlets and CGI

  • 1. JAVA SERVLETS AND CGI Presented by M.LAVANYA M.sc(CS & IT) Nadar Saraswathi college of arts & science, Theni.
  • 2. INTRODUCTION TO SERVLETS • Servlet Technology is used to create web applications. • Servlet technology uses Java language to create web applications. • Web applications are helper applications that resides at web server and build dynamic web pages. • A dynamic page could be anything like a page that randomly chooses picture to display or even a page that displays the current time.
  • 3. As Servlet Technology uses Java, web applications made using Servlet are Secured, Scalable and Robust.
  • 4. INTRODUCTION OF CGI • CGI (Common Gateway Interface) is used to provide dynamic content to the user. • CGI is used to execute a program that resides in the server to process data or access databases to produce the relevant dynamic content. • Programs that resides in server can be written in native operating system such as C++.
  • 6. DIFFERENT OF CGI Servlet CGI (Common Gateway Interface) Servlets are portable CGI is not portable. In Servlets each request is handled by lightweight Java Thread IN CGI each request is handled by heavy weight OS process In Servlets, Data sharing is possible In CGI, data sharing is not available. Servlets can link directly to the Web server CGI cannot directly link to Web server. Session tracking and caching of previous computations can be performed Session tracking and caching of previous computations cannot be performed
  • 7. Automatic parsing and decoding of HTML form data can be performed. Automatic parsing and decoding of HTML form data cannot be performed. Servlets can read and Set HTTP Headers CGI cannot read and Set HTTP Headers Servlets can handle cookies CGI cannot handle cookies Servlets can track sessions CGI cannot track sessions Servlets is inexpensive than CGI CGI is more expensive than Servlets
  • 8. CGI (COMMON GATEWAY INTERFACE) • Before Servlets, CGI(Common Gateway Interface) programming was used to create web applications. Here's how a CGI program works : • User clicks a link that has URL to a dynamic page instead of a static page.
  • 9. • The URL decides which CGI program to execute. • Web Servers run the CGI program in separate OS shell. The shell includes OS environment and the process to execute code of the CGI program. • The CGI response is sent back to the Web Server, which wraps the response in an HTTP response and send it back to the web browser.
  • 10. CGI
  • 11. DRAWBACKS OF CGI PROGRAMS • High response time because CGI programs execute in their own OS shell. • CGI is not scalable. • CGI programs are not always secure or object-oriented. • It is Platform dependent.
  • 12. SERVLETS • CGI programs are used to execute programs written inside the native language. But in Servlet all the programs are compiled into the Java byte code which is then run in the Java virtual machine. • In Servlet, All the requests coming from the Client are processed with the threads instead of the OS process.
  翻译: