SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
Servlet / JSP course topics
•   Chapter 0 Introduction to Java Web Development
•   Chapter 1 Introduction to servlets
•   Chapter 2 Introduction to JavaServer Pages
•   Chapter 3 How to use the MVC pattern in a Java Web Application
•   Chapter 4 How to share information in servlets and JSPs
•   Chapter 5 Advanced JSP concepts
•   Chapter 6 How to use JavaBeans with JSP
•   Chapter 7 How to use the JSP Expression Language (EL)
•   Chapter 8 How to use the JSP Standard Tag Library (JSTL)
•   Chapter 9 How to use custom JSP tags
•   Chapter 10 How to access databases in java web applications
•   Chapter 11 How to use JavaMail to send email
•   Chapter 12 How to secure java web applications
•   Chapter 13 How to download files with Servlets
•   Chapter 14 How to work with listeners
•   Chapter 15 How to work with filters
Introduction to
Java Web Development
Introduction to Java Web
                Development
•   Java Enterprise Edition
•   Java Web Development
•   Structure of a web project
•   Introduction to Web Applications
•   The first project
Java Enterprise Edition
Java Web Development




* Note
In this course only JSP & servlets will be discussed
Structure of a web project
• There are two kind of structures
   – The structure of the web application in a server
   – The structure of the IDE

• A web project have three main elements
   – The JSPs files
   – The java classes
   – The Configuration file web.xml
Structure of a web project
       in the server
Structure of a web project
       in the server
                       Root of the project



                      Java classes (.class)

                      Java Libraries (.jar)

                      Configuration files

                      Anything web-related
                      - Directories
                      - JavaServer Pages (JSP)
                      - HTML
                      - Css files
                      - JavaScript Files
                      - Etc.
Introduction to Web Applications
• In a Web Application, web components provide the dynamic
  extension capabilities for a web server.
• Web components can be Java servlets, JSP pages, or web
  service endpoints.
• The interaction between a web client and a web application is
  explained and illustrated in the next slide figure.
   – The client sends an HTTP request to the web server.
   – A web server that implements Java Servlet and JavaServer Pages
     technology converts the request into an HTTPServletRequest object.
   – This object is delivered to a web component, which can interact with
     JavaBeans components or a database to generate dynamic content.
   – The web component can then generate an HTTPServletResponse or it
     can pass the request to another web component.
   – Eventually a web component generates a HTTPServletResponse
     object. The web server converts this object to an HTTP response and
     returns it to the client.
Introduction to Web Applications
Introduction to Web Applications
• Servlets are Java programming language classes that
  dynamically process requests and construct responses. 
• JSP pages are text-based documents that execute as servlets
  but allow a more natural approach to creating static content.
• Although servlets and JSP pages can be used interchangeably,
  each has its own strengths.
• Servlets are best suited for service-oriented applications (web
  service endpoints are implemented as servlets) and the
  control functions of a presentation-oriented application, such
  as dispatching requests and handling nontextual data.
• JSP pages are more appropriate for generating text-based
  markup such as HTML, Scalable Vector Graphics (SVG),
  Wireless Markup Language (WML), and XML.
Servlets versus JSP
Life Cycle of a
JEE Web Application
Life Cycle of a
JEE Web Application
Criteria to develop web applications
Exercise 1
•      Develope the first java web
       application
1.     Download the file:
     jspservlet-00.zip
1.     Unzip it
2.     Import from Eclipse
3.     Run it
Exercise 1
                  Results
• You should get this result
Exercise 1
                                Analisis
• The web.xml file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" . . . version="2.5">

  <servlet>
    <display-name>HelloWorldServlet</display-name>
    <servlet-name>HelloWorldServlet</servlet-name>
    <servlet-class>
        com.example.servlets.HelloWorldServlet
    </servlet-class>
  </servlet>                                                               Servlet
  <servlet>                                                              declarations
    <display-name>AnotherServlet</display-name>
    <servlet-name>AnotherServlet</servlet-name>
    <servlet-class>
        com.example.servlets.AnotherServlet
    </servlet-class>
  </servlet>
Exercise 1
                      Analisis
• The web.xml file
. . .
  <servlet-mapping>
    <servlet-name>HelloWorldServlet</servlet-name>
    <url-pattern>/HelloWorldServlet</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>AnotherServlet</servlet-name>       Servlet
    <url-pattern>/AnotherServlet</url-pattern>       mappings
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
</web-app>
Exercise 1
 Analisis

        Servlet classes
        (other might be here classes too)




        Other resources might be here

Contenu connexe

Tendances

Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsSagara Gunathunga
 
Alfresco Mvc - a seamless integration with Spring Mvc
Alfresco Mvc - a seamless integration with Spring MvcAlfresco Mvc - a seamless integration with Spring Mvc
Alfresco Mvc - a seamless integration with Spring MvcDaniel Gradecak
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSINGAaqib Hussain
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)Manisha Keim
 
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)JavaEE Trainers
 
Jive the renovation of Aswing
Jive the renovation of AswingJive the renovation of Aswing
Jive the renovation of Aswingantopensource
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in MuleShahid Shaik
 
weblogic training | oracle weblogic online training | weblogic server course
weblogic training | oracle weblogic online training | weblogic server courseweblogic training | oracle weblogic online training | weblogic server course
weblogic training | oracle weblogic online training | weblogic server courseNancy Thomas
 
Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course JavaEE Trainers
 
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability GroupsSQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groupsturgaysahtiyan
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 
J2EE_Course_Content
J2EE_Course_ContentJ2EE_Course_Content
J2EE_Course_ContentMV Solutions
 
SpringPeople Introduction to MongoDB Administration
SpringPeople Introduction to MongoDB AdministrationSpringPeople Introduction to MongoDB Administration
SpringPeople Introduction to MongoDB AdministrationSpringPeople
 

Tendances (19)

Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rs
 
Alfresco Mvc - a seamless integration with Spring Mvc
Alfresco Mvc - a seamless integration with Spring MvcAlfresco Mvc - a seamless integration with Spring Mvc
Alfresco Mvc - a seamless integration with Spring Mvc
 
Client server 01
Client server 01Client server 01
Client server 01
 
Jsp basic
Jsp basicJsp basic
Jsp basic
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
 
Jive the renovation of Aswing
Jive the renovation of AswingJive the renovation of Aswing
Jive the renovation of Aswing
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in Mule
 
Java
JavaJava
Java
 
weblogic training | oracle weblogic online training | weblogic server course
weblogic training | oracle weblogic online training | weblogic server courseweblogic training | oracle weblogic online training | weblogic server course
weblogic training | oracle weblogic online training | weblogic server course
 
Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course
 
Jsp Comparison
 Jsp Comparison Jsp Comparison
Jsp Comparison
 
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability GroupsSQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
 
Jsp(java server pages)
Jsp(java server pages)Jsp(java server pages)
Jsp(java server pages)
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
J2EE_Course_Content
J2EE_Course_ContentJ2EE_Course_Content
J2EE_Course_Content
 
SpringPeople Introduction to MongoDB Administration
SpringPeople Introduction to MongoDB AdministrationSpringPeople Introduction to MongoDB Administration
SpringPeople Introduction to MongoDB Administration
 

Similaire à Jeetrainers.com coursejspservlets00

Core web application development
Core web application developmentCore web application development
Core web application developmentBahaa Farouk
 
JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...MathivananP4
 
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.pptsindhu991994
 
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptLecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptKalsoomTahir2
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and ServletsRaghu nath
 
JEE Course - The Web Tier
JEE Course - The Web TierJEE Course - The Web Tier
JEE Course - The Web Tierodedns
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music storeADEEBANADEEM
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1Д. Ганаа
 
005432796.pdf
005432796.pdf005432796.pdf
005432796.pdfEidTahir
 
Enterprise java unit-3_chapter-1-jsp
Enterprise  java unit-3_chapter-1-jspEnterprise  java unit-3_chapter-1-jsp
Enterprise java unit-3_chapter-1-jspsandeep54552
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)slire
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jspJafar Nesargi
 

Similaire à Jeetrainers.com coursejspservlets00 (20)

Advance java1.1
Advance java1.1Advance java1.1
Advance java1.1
 
Core web application development
Core web application developmentCore web application development
Core web application development
 
JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...
 
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt
 
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptLecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and Servlets
 
JEE Course - The Web Tier
JEE Course - The Web TierJEE Course - The Web Tier
JEE Course - The Web Tier
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1
 
Weblogic
WeblogicWeblogic
Weblogic
 
005432796.pdf
005432796.pdf005432796.pdf
005432796.pdf
 
Enterprise java unit-3_chapter-1-jsp
Enterprise  java unit-3_chapter-1-jspEnterprise  java unit-3_chapter-1-jsp
Enterprise java unit-3_chapter-1-jsp
 
Servlets
ServletsServlets
Servlets
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Java .ppt
Java .pptJava .ppt
Java .ppt
 
25.ppt
25.ppt25.ppt
25.ppt
 
JSP.pptx
JSP.pptxJSP.pptx
JSP.pptx
 
Jsp
JspJsp
Jsp
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Servlet.pptx
Servlet.pptxServlet.pptx
Servlet.pptx
 

Plus de Rajesh Moorjani

Plus de Rajesh Moorjani (8)

Coursejspservlets00
Coursejspservlets00Coursejspservlets00
Coursejspservlets00
 
Krazykoder variables
Krazykoder variablesKrazykoder variables
Krazykoder variables
 
Krazykoder variables
Krazykoder variablesKrazykoder variables
Krazykoder variables
 
Krazykoder features intro_3
Krazykoder features intro_3Krazykoder features intro_3
Krazykoder features intro_3
 
Krazykoder features intro_2
Krazykoder features intro_2Krazykoder features intro_2
Krazykoder features intro_2
 
Krazykoder features intro_2
Krazykoder features intro_2Krazykoder features intro_2
Krazykoder features intro_2
 
Krazykoder features intro
Krazykoder features introKrazykoder features intro
Krazykoder features intro
 
Krazykoder features intro
Krazykoder features introKrazykoder features intro
Krazykoder features intro
 

Dernier

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Jeetrainers.com coursejspservlets00

  • 1.
  • 2. Servlet / JSP course topics • Chapter 0 Introduction to Java Web Development • Chapter 1 Introduction to servlets • Chapter 2 Introduction to JavaServer Pages • Chapter 3 How to use the MVC pattern in a Java Web Application • Chapter 4 How to share information in servlets and JSPs • Chapter 5 Advanced JSP concepts • Chapter 6 How to use JavaBeans with JSP • Chapter 7 How to use the JSP Expression Language (EL) • Chapter 8 How to use the JSP Standard Tag Library (JSTL) • Chapter 9 How to use custom JSP tags • Chapter 10 How to access databases in java web applications • Chapter 11 How to use JavaMail to send email • Chapter 12 How to secure java web applications • Chapter 13 How to download files with Servlets • Chapter 14 How to work with listeners • Chapter 15 How to work with filters
  • 4. Introduction to Java Web Development • Java Enterprise Edition • Java Web Development • Structure of a web project • Introduction to Web Applications • The first project
  • 6. Java Web Development * Note In this course only JSP & servlets will be discussed
  • 7. Structure of a web project • There are two kind of structures – The structure of the web application in a server – The structure of the IDE • A web project have three main elements – The JSPs files – The java classes – The Configuration file web.xml
  • 8. Structure of a web project in the server
  • 9. Structure of a web project in the server Root of the project Java classes (.class) Java Libraries (.jar) Configuration files Anything web-related - Directories - JavaServer Pages (JSP) - HTML - Css files - JavaScript Files - Etc.
  • 10. Introduction to Web Applications • In a Web Application, web components provide the dynamic extension capabilities for a web server. • Web components can be Java servlets, JSP pages, or web service endpoints. • The interaction between a web client and a web application is explained and illustrated in the next slide figure. – The client sends an HTTP request to the web server. – A web server that implements Java Servlet and JavaServer Pages technology converts the request into an HTTPServletRequest object. – This object is delivered to a web component, which can interact with JavaBeans components or a database to generate dynamic content. – The web component can then generate an HTTPServletResponse or it can pass the request to another web component. – Eventually a web component generates a HTTPServletResponse object. The web server converts this object to an HTTP response and returns it to the client.
  • 11. Introduction to Web Applications
  • 12. Introduction to Web Applications • Servlets are Java programming language classes that dynamically process requests and construct responses.  • JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content. • Although servlets and JSP pages can be used interchangeably, each has its own strengths. • Servlets are best suited for service-oriented applications (web service endpoints are implemented as servlets) and the control functions of a presentation-oriented application, such as dispatching requests and handling nontextual data. • JSP pages are more appropriate for generating text-based markup such as HTML, Scalable Vector Graphics (SVG), Wireless Markup Language (WML), and XML.
  • 14. Life Cycle of a JEE Web Application
  • 15. Life Cycle of a JEE Web Application
  • 16. Criteria to develop web applications
  • 17. Exercise 1 • Develope the first java web application 1. Download the file: jspservlet-00.zip 1. Unzip it 2. Import from Eclipse 3. Run it
  • 18. Exercise 1 Results • You should get this result
  • 19. Exercise 1 Analisis • The web.xml file <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" . . . version="2.5"> <servlet> <display-name>HelloWorldServlet</display-name> <servlet-name>HelloWorldServlet</servlet-name> <servlet-class> com.example.servlets.HelloWorldServlet </servlet-class> </servlet> Servlet <servlet> declarations <display-name>AnotherServlet</display-name> <servlet-name>AnotherServlet</servlet-name> <servlet-class> com.example.servlets.AnotherServlet </servlet-class> </servlet>
  • 20. Exercise 1 Analisis • The web.xml file . . . <servlet-mapping> <servlet-name>HelloWorldServlet</servlet-name> <url-pattern>/HelloWorldServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AnotherServlet</servlet-name> Servlet <url-pattern>/AnotherServlet</url-pattern> mappings </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
  • 21. Exercise 1 Analisis Servlet classes (other might be here classes too) Other resources might be here