Submit Search
Upload
Java Servlets
•
Download as PPT, PDF
•
43 likes
•
32,071 views
BG Java EE Course
Follow
Short presentation about Java Servlets.
Read less
Read more
Technology
Slideshow view
Report
Share
Slideshow view
Report
Share
1 of 58
Download now
Recommended
JDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
Servlets
Servlets
ZainabNoorGul
Java Server Pages(jsp)
Java Server Pages(jsp)
Manisha Keim
Jsp ppt
Jsp ppt
Vikas Jagtap
Servlet and servlet life cycle
Servlet and servlet life cycle
Dhruvin Nakrani
Collection Framework in java
Collection Framework in java
CPD INDIA
Asp.net.
Asp.net.
Naveen Sihag
Threads in JAVA
Threads in JAVA
Haldia Institute of Technology
Recommended
JDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
Servlets
Servlets
ZainabNoorGul
Java Server Pages(jsp)
Java Server Pages(jsp)
Manisha Keim
Jsp ppt
Jsp ppt
Vikas Jagtap
Servlet and servlet life cycle
Servlet and servlet life cycle
Dhruvin Nakrani
Collection Framework in java
Collection Framework in java
CPD INDIA
Asp.net.
Asp.net.
Naveen Sihag
Threads in JAVA
Threads in JAVA
Haldia Institute of Technology
jQuery for beginners
jQuery for beginners
Arulmurugan Rajaraman
Jdbc ppt
Jdbc ppt
sandeep54552
Chapter 3 servlet & jsp
Chapter 3 servlet & jsp
Jafar Nesargi
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
slire
Java collections concept
Java collections concept
kumar gaurav
JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
HTTP request and response
HTTP request and response
Sahil Agarwal
JAVA AWT
JAVA AWT
shanmuga rajan
Ado.Net Tutorial
Ado.Net Tutorial
prabhu rajendran
Java Collections
Java Collections
Kongu Engineering College, Perundurai, Erode
JDBC ppt
JDBC ppt
Rohit Jain
Java: GUI
Java: GUI
Tareq Hasan
Introduction to ASP.NET
Introduction to ASP.NET
Rajkumarsoy
Spring ppt
Spring ppt
Mumbai Academisc
Introduction of Html/css/js
Introduction of Html/css/js
Knoldus Inc.
Arrays in Java
Arrays in Java
Abhilash Nair
Servlet life cycle
Servlet life cycle
Venkateswara Rao N
servlet in java
servlet in java
sowfi
JDBC – Java Database Connectivity
JDBC – Java Database Connectivity
Information Technology
Servlet.ppt
Servlet.ppt
VMahesh5
Java Servlets
Java Servlets
Nitin Pai
Java servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
kamal kotecha
More Related Content
What's hot
jQuery for beginners
jQuery for beginners
Arulmurugan Rajaraman
Jdbc ppt
Jdbc ppt
sandeep54552
Chapter 3 servlet & jsp
Chapter 3 servlet & jsp
Jafar Nesargi
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
slire
Java collections concept
Java collections concept
kumar gaurav
JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
HTTP request and response
HTTP request and response
Sahil Agarwal
JAVA AWT
JAVA AWT
shanmuga rajan
Ado.Net Tutorial
Ado.Net Tutorial
prabhu rajendran
Java Collections
Java Collections
Kongu Engineering College, Perundurai, Erode
JDBC ppt
JDBC ppt
Rohit Jain
Java: GUI
Java: GUI
Tareq Hasan
Introduction to ASP.NET
Introduction to ASP.NET
Rajkumarsoy
Spring ppt
Spring ppt
Mumbai Academisc
Introduction of Html/css/js
Introduction of Html/css/js
Knoldus Inc.
Arrays in Java
Arrays in Java
Abhilash Nair
Servlet life cycle
Servlet life cycle
Venkateswara Rao N
servlet in java
servlet in java
sowfi
JDBC – Java Database Connectivity
JDBC – Java Database Connectivity
Information Technology
Servlet.ppt
Servlet.ppt
VMahesh5
What's hot
(20)
jQuery for beginners
jQuery for beginners
Jdbc ppt
Jdbc ppt
Chapter 3 servlet & jsp
Chapter 3 servlet & jsp
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
Java collections concept
Java collections concept
JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
HTTP request and response
HTTP request and response
JAVA AWT
JAVA AWT
Ado.Net Tutorial
Ado.Net Tutorial
Java Collections
Java Collections
JDBC ppt
JDBC ppt
Java: GUI
Java: GUI
Introduction to ASP.NET
Introduction to ASP.NET
Spring ppt
Spring ppt
Introduction of Html/css/js
Introduction of Html/css/js
Arrays in Java
Arrays in Java
Servlet life cycle
Servlet life cycle
servlet in java
servlet in java
JDBC – Java Database Connectivity
JDBC – Java Database Connectivity
Servlet.ppt
Servlet.ppt
Viewers also liked
Java Servlets
Java Servlets
Nitin Pai
Java servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
kamal kotecha
Java basic
Java basic
Sonam Sharma
Introduction to Java Programming Language
Introduction to Java Programming Language
jaimefrozr
Introduction to Java Programming
Introduction to Java Programming
Ravi Kant Sahu
Java programming course for beginners
Java programming course for beginners
Eduonix Learning Solutions
Core java concepts
Core java concepts
Ram132
Java tutorial PPT
Java tutorial PPT
Intelligo Technologies
Presentation on Core java
Presentation on Core java
mahir jain
Core java slides
Core java slides
Abhilash Nair
Introduction to java
Introduction to java
Veerabadra Badra
Viewers also liked
(11)
Java Servlets
Java Servlets
Java servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
Java basic
Java basic
Introduction to Java Programming Language
Introduction to Java Programming Language
Introduction to Java Programming
Introduction to Java Programming
Java programming course for beginners
Java programming course for beginners
Core java concepts
Core java concepts
Java tutorial PPT
Java tutorial PPT
Presentation on Core java
Presentation on Core java
Core java slides
Core java slides
Introduction to java
Introduction to java
Similar to Java Servlets
Java Servlets.pdf
Java Servlets.pdf
Arumugam90
Servlet
Servlet
Dhara Joshi
1 java servlets and jsp
1 java servlets and jsp
Ankit Minocha
Basics Of Servlet
Basics Of Servlet
Shubhani Jain
Http Server Programming in JAVA - Handling http requests and responses
Http Server Programming in JAVA - Handling http requests and responses
bharathiv53
UNIT-3 Servlet
UNIT-3 Servlet
ssbd6985
Servlets
Servlets
Akshay Ballarpure
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
Fahmi Jafar
java Servlet technology
java Servlet technology
Tanmoy Barman
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
Tushar B Kute
WEB TECHNOLOGIES Servlet
WEB TECHNOLOGIES Servlet
Jyothishmathi Institute of Technology and Science Karimnagar
Servlets
Servlets
Sasidhar Kothuru
SCWCD 2. servlet req - resp (cap3 - cap4)
SCWCD 2. servlet req - resp (cap3 - cap4)
Francesco Ierna
Server-side Technologies in Java
Server-side Technologies in Java
Anirban Majumdar
JAVA Servlets
JAVA Servlets
deepak kumar
Bt0083 server side programing
Bt0083 server side programing
Techglyphs
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
WebStackAcademy
Servlet by Rj
Servlet by Rj
Shree M.L.Kakadiya MCA mahila college, Amreli
Wt unit 3
Wt unit 3
team11vgnt
Dynamic content generation
Dynamic content generation
Eleonora Ciceri
Similar to Java Servlets
(20)
Java Servlets.pdf
Java Servlets.pdf
Servlet
Servlet
1 java servlets and jsp
1 java servlets and jsp
Basics Of Servlet
Basics Of Servlet
Http Server Programming in JAVA - Handling http requests and responses
Http Server Programming in JAVA - Handling http requests and responses
UNIT-3 Servlet
UNIT-3 Servlet
Servlets
Servlets
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
java Servlet technology
java Servlet technology
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
WEB TECHNOLOGIES Servlet
WEB TECHNOLOGIES Servlet
Servlets
Servlets
SCWCD 2. servlet req - resp (cap3 - cap4)
SCWCD 2. servlet req - resp (cap3 - cap4)
Server-side Technologies in Java
Server-side Technologies in Java
JAVA Servlets
JAVA Servlets
Bt0083 server side programing
Bt0083 server side programing
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 4...
Servlet by Rj
Servlet by Rj
Wt unit 3
Wt unit 3
Dynamic content generation
Dynamic content generation
More from BG Java EE Course
Rich faces
Rich faces
BG Java EE Course
JSP Custom Tags
JSP Custom Tags
BG Java EE Course
Java Server Faces (JSF) - advanced
Java Server Faces (JSF) - advanced
BG Java EE Course
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
BG Java EE Course
JSTL
JSTL
BG Java EE Course
Unified Expression Language
Unified Expression Language
BG Java EE Course
Java Server Pages
Java Server Pages
BG Java EE Course
Web Applications and Deployment
Web Applications and Deployment
BG Java EE Course
CSS
CSS
BG Java EE Course
HTML: Tables and Forms
HTML: Tables and Forms
BG Java EE Course
HTML Fundamentals
HTML Fundamentals
BG Java EE Course
WWW and HTTP
WWW and HTTP
BG Java EE Course
JavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
BG Java EE Course
Creating Web Sites with HTML and CSS
Creating Web Sites with HTML and CSS
BG Java EE Course
Processing XML with Java
Processing XML with Java
BG Java EE Course
Introduction to XML
Introduction to XML
BG Java EE Course
Data Access with JDBC
Data Access with JDBC
BG Java EE Course
Introduction to-sql
Introduction to-sql
BG Java EE Course
Introduction to-RDBMS-systems
Introduction to-RDBMS-systems
BG Java EE Course
Basic data-structures-v.1.1
Basic data-structures-v.1.1
BG Java EE Course
More from BG Java EE Course
(20)
Rich faces
Rich faces
JSP Custom Tags
JSP Custom Tags
Java Server Faces (JSF) - advanced
Java Server Faces (JSF) - advanced
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
JSTL
JSTL
Unified Expression Language
Unified Expression Language
Java Server Pages
Java Server Pages
Web Applications and Deployment
Web Applications and Deployment
CSS
CSS
HTML: Tables and Forms
HTML: Tables and Forms
HTML Fundamentals
HTML Fundamentals
WWW and HTTP
WWW and HTTP
JavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
Creating Web Sites with HTML and CSS
Creating Web Sites with HTML and CSS
Processing XML with Java
Processing XML with Java
Introduction to XML
Introduction to XML
Data Access with JDBC
Data Access with JDBC
Introduction to-sql
Introduction to-sql
Introduction to-RDBMS-systems
Introduction to-RDBMS-systems
Basic data-structures-v.1.1
Basic data-structures-v.1.1
Recently uploaded
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Edi Saputra
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Principled Technologies
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
MIND CTI
Recently uploaded
(20)
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
Java Servlets
1.
Java Servlets Svetlin
Nakov Borislava Spasova
2.
3.
4.
Java Servlets Technology
Overview
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
Java Servlets Technical
Architecture
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
Java Servlets Examples
26.
27.
28.
Hello Servlet –
Example public void doGet(HttpServletRequest r equest, HttpServletResponse r esponse) throws ServletException, IOException { r esponse.setContentType("text/html"); ServletOutputStream out = r esponse.getOutputStream(); String userName = r equest.getParameter("user_name"); out.println("<html> <head> "); out.println("<title>Hello Servlet</title>"); out.println("</head><body>"); out.println("<h1>Hello, " + userName + "</h1>"); out.println("</body></html>"); } Hello Servlet . java
29.
30.
31.
Hello Servlet in
Action
32.
33.
34.
35.
Image Counter Servlet
(2) import javax.servlet.*; import javax.servlet.http.*; ... public class ImageCounterServlet extends HttpServlet { private String mStartDate; private int mVisitCounter; public void init() { mStartDate = (new Date()).toString(); mVisitCounter = 0; } public BufferedImage createImage(String msg) { ... }
36.
Image Counter Servlet
(3) public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String msg; synchronized(this) { mVisitCounter++; msg = "" + mVisitCounter + " visits since " + mStartDate; } BufferedImage image = createImage(msg); response.setContentType("image/jpeg"); OutputStream out = response.getOutputStream(); // Encode the image in JPEG format and // write the image to the output stream } }
37.
Image Counter Servlet
in Action
38.
Using Sessions
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
Login Form <html>
<head><title>Login</title></head> <body> <form method="POST" action="LoginServlet"> Please login:<br> Username: <input type="text" name="username"><br> Password: <input type="password" name="password"><br> <input type="submit" value="Login"> </form> </body> </html> LoginForm.html
51.
Login Servlet public
class LoginServlet extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { String username = req.getParameter("username"); String password = req.getParameter("password"); PrintWriter out = resp.getWriter(); if (isLoginValid(username, password)) { HttpSession session = req.getSession(); session.setAttribute("USER", username); response.sendRedirect("MainServlet"); } else { response.sendRedirect("InvalidLogin.html"); } } } Login Servlet . java
52.
Main Servlet public
class MainServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = request.getSession(); String userName = (String) s ession.getAttribute("USER"); if (userName != null) { response.setContentType("text/html"); ServletOutputStream out = resp.getOutputStream(); out.println("<html> <body><h1> "); out.println("Hello, " + userName + "! "); out.println(" </h1> </body></html>"); } else { response.sendRedirect("LoginForm.html"); } } } MainServlet.java
53.
Logout Servlet public
class LogoutServlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); session.invalidate(); response.setContentType("text/html"); ServletOutputStream out = response.getOutputStream(); out.println("<html><head>"); out.println("<title>Logout</title></head>"); out.println("<body>"); out.println("<h1>Logout successfull.</h1>"); out.println("</body></html>"); } } LogoutServlet.java
54.
Invalid Login Page
<html> <head> <title>Error</title> </head> <body> <h1>Invalid login!</h1> Please <a href="LoginForm.html">try again</a>. </body> </html> InvalidLogin.html
55.
56.
57.
58.
Editor's Notes
## * * 07/16/96
## * * 07/16/96
## * * 07/16/96 Example of HTTP GET: Google search Example of HTTP POST: Login page
## * * 07/16/96
## * * 07/16/96
## * * 07/16/96
## * * 07/16/96
Note: As of Servlet 2.2, the getValue() method is now deprecated. Use getAttribute() instead.
Note: As of Servlet 2.2, the getValue() method is now deprecated. Use getAttribute() instead.
Download now