SlideShare una empresa de Scribd logo
1 de 2
JSP Viva Questions
Q: What is JSP?
A: JavaServer Pages (JSP) is a technologyfor developing web pages that support dynamic content which helps
developers insertjava code in HTML pages by making use of special JSP tags, most of which start with <% and
end with %>.
Q: What are advantages of using JSP?
A: JSP offer several advantages as listed below:
 Performance is significantly better because JSP allows embedding Dynamic Elements in HTML Pages itself.
 JSP are always compiled before it's processed bythe server unlike CGI/Perl which requires the server to load an
interpreter and the target script each time the page is requested.
 JavaServer Pages are built on top of the Java Servlets API, so like Servlets, JSP also has access to all the
powerful Enterprise Java APIs, including JDBC, JNDI, EJB, JAXP etc.
 JSP pages can be used in combination with servlets thathandle the business logic,the model supported by Java
servlet template engines.
Q: What are the advantages of JSP over Active Server Pages (ASP)?
A: The advantages of JSP are twofold.
First, the dynamic part is written in Java, not Visual Basic or other MS specific language, so it is more powerful
and easier to use.
Second, it is portable to other operating systems and non-Microsoft Web servers.
Q: What are the advantages of JSP over Pure Servlets?
A: It is more convenient to write (and to modify!) regular HTML than to have plenty of println statements that
generate the HTML. Other advantages are:
 Embedding of Java code in HTML pages.
 Platform independence.
 Creation of database-driven Web applications.
 Server-side programming capabilities.
Q: What are the advantages of JSP over Server-Side Includes (SSI)?
A: SSI is really only intended for simple inclusions, not for "real" programs that use form data, make database
connections, and the like.
Q: What are the advantages of JSP over JavaScript?
A: JavaScript can generate HTML dynamicallyon the clientbut can hardly interactwith the web server to perform
complex tasks like database access and image processing etc.
Q: What are the advantages of JSP over Static HTML?
A: Regular HTML, of course, cannot contain dynamic information.
Q: Explain lifecycle of a JSP.
A:A JSP Lifecycle consists of following steps:
 Compilation: When a browser asks for a JSP, the JSP engine firstchecks to see whether it needs to compile the
page.If the page has never been compiled, or if the JSP has been modified since it was last compiled, the JSP
engine compiles the page.
The compilation process involves three steps:
o Parsing the JSP.
o Turning the JSP into a servlet.
o Compiling the servlet.
 Initialization: When a container loads a JSP it invokes the jspInit() method before servicing any requests
 Execution: Whenever a browser requests a JSP and the page has been loaded and initialized, the JSP engine
invokes the _jspService() method in the JSP.The _jspService() method of a JSP is invoked once per a request
and is responsible for generating the response for that requestand this method is also responsible for generating
responses to all seven of the HTTP methods ie. GET, POST, DELETE etc.
 Cleanup: The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a
container.The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

Más contenido relacionado

La actualidad más candente

La actualidad más candente (19)

Dynamic web pages in java
Dynamic web pages in javaDynamic web pages in java
Dynamic web pages in java
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...
 
Gwt Presentation1
Gwt Presentation1Gwt Presentation1
Gwt Presentation1
 
work-experience
work-experiencework-experience
work-experience
 
Power Training DevDays 2009
Power Training DevDays 2009Power Training DevDays 2009
Power Training DevDays 2009
 
From MVC to React
From MVC to ReactFrom MVC to React
From MVC to React
 
Server side scripting
Server side scriptingServer side scripting
Server side scripting
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Jsp
JspJsp
Jsp
 
Angular js
Angular jsAngular js
Angular js
 
Week1 dq5
Week1 dq5Week1 dq5
Week1 dq5
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
Jsp basic
Jsp basicJsp basic
Jsp basic
 
Client side vs server side
Client side vs server sideClient side vs server side
Client side vs server side
 
Introduction to Web Development
Introduction to Web DevelopmentIntroduction to Web Development
Introduction to Web Development
 
JavaScript
JavaScriptJavaScript
JavaScript
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)
 
Advance java session 9
Advance java session 9Advance java session 9
Advance java session 9
 

Destacado

Servlet viva questions
Servlet viva questionsServlet viva questions
Servlet viva questionsVipul Naik
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questionsVipul Naik
 
C basic questions&amp;ansrs by shiva kumar kella
C basic questions&amp;ansrs by shiva kumar kellaC basic questions&amp;ansrs by shiva kumar kella
C basic questions&amp;ansrs by shiva kumar kellaManoj Kumar kothagulla
 
Javascript viva questions
Javascript viva questionsJavascript viva questions
Javascript viva questionsVipul Naik
 
Html viva questions
Html viva questionsHtml viva questions
Html viva questionsVipul Naik
 
Economic dispatch in power systems - Question Bank
Economic dispatch in power systems - Question Bank  Economic dispatch in power systems - Question Bank
Economic dispatch in power systems - Question Bank Mathankumar S
 
Operating system interview question
Operating system interview questionOperating system interview question
Operating system interview questionsriram saravanan
 
operating system question bank
operating system question bankoperating system question bank
operating system question bankrajatdeep kaur
 
Technical seminar report on
Technical seminar report onTechnical seminar report on
Technical seminar report onBalveer Rathore
 
Os solved question paper
Os solved question paperOs solved question paper
Os solved question paperAnkit Bhatnagar
 
Operating system concepts (notes)
Operating system concepts (notes)Operating system concepts (notes)
Operating system concepts (notes)Sohaib Danish
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...vtunotesbysree
 
Java questions for viva
Java questions for vivaJava questions for viva
Java questions for vivaVipul Naik
 
Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 iimjobs and hirist
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questionsadarshynl
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobGaruda Trainings
 
Top 100 PHP Questions and Answers
Top 100 PHP Questions and AnswersTop 100 PHP Questions and Answers
Top 100 PHP Questions and Answersiimjobs and hirist
 

Destacado (20)

Servlet viva questions
Servlet viva questionsServlet viva questions
Servlet viva questions
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
 
C basic questions&amp;ansrs by shiva kumar kella
C basic questions&amp;ansrs by shiva kumar kellaC basic questions&amp;ansrs by shiva kumar kella
C basic questions&amp;ansrs by shiva kumar kella
 
Javascript viva questions
Javascript viva questionsJavascript viva questions
Javascript viva questions
 
Basic os-concepts
Basic os-conceptsBasic os-concepts
Basic os-concepts
 
Html viva questions
Html viva questionsHtml viva questions
Html viva questions
 
Economic dispatch in power systems - Question Bank
Economic dispatch in power systems - Question Bank  Economic dispatch in power systems - Question Bank
Economic dispatch in power systems - Question Bank
 
Operating system interview question
Operating system interview questionOperating system interview question
Operating system interview question
 
operating system question bank
operating system question bankoperating system question bank
operating system question bank
 
Technical seminar report on
Technical seminar report onTechnical seminar report on
Technical seminar report on
 
Os solved question paper
Os solved question paperOs solved question paper
Os solved question paper
 
Operating system concepts (notes)
Operating system concepts (notes)Operating system concepts (notes)
Operating system concepts (notes)
 
Dbms viva questions
Dbms viva questionsDbms viva questions
Dbms viva questions
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
 
Java questions for viva
Java questions for vivaJava questions for viva
Java questions for viva
 
Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
 
Java codes
Java codesJava codes
Java codes
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a job
 
Top 100 PHP Questions and Answers
Top 100 PHP Questions and AnswersTop 100 PHP Questions and Answers
Top 100 PHP Questions and Answers
 

Similar a Jsp viva questions

Similar a Jsp viva questions (20)

The Java Server Page in Java Concept.pptx
The Java Server Page in Java Concept.pptxThe Java Server Page in Java Concept.pptx
The Java Server Page in Java Concept.pptx
 
Jsp
JspJsp
Jsp
 
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
 
Java server pages
Java server pagesJava server pages
Java server pages
 
JSP overview
JSP overviewJSP overview
JSP overview
 
Jsp abes new
Jsp abes newJsp abes new
Jsp abes new
 
Jsp
JspJsp
Jsp
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
 
Unit 4 web technology uptu
Unit 4 web technology uptuUnit 4 web technology uptu
Unit 4 web technology uptu
 
Unit 4 1 web technology uptu
Unit 4 1 web technology uptuUnit 4 1 web technology uptu
Unit 4 1 web technology uptu
 
Java JSP.pptx
Java JSP.pptxJava JSP.pptx
Java JSP.pptx
 
JAVA SERVER PAGE
JAVA SERVER PAGEJAVA SERVER PAGE
JAVA SERVER PAGE
 
JAVA SERVER PAGES
JAVA SERVER PAGESJAVA SERVER PAGES
JAVA SERVER PAGES
 
Jsp in Servlet by Rj
Jsp in Servlet by RjJsp in Servlet by Rj
Jsp in Servlet by Rj
 
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...
 
Csajsp Chapter10
Csajsp Chapter10Csajsp Chapter10
Csajsp Chapter10
 
Bt0083 server side programming-theory
Bt0083   server side programming-theoryBt0083   server side programming-theory
Bt0083 server side programming-theory
 
JSP Technology I
JSP Technology IJSP Technology I
JSP Technology I
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Jsp tutorial
Jsp tutorialJsp tutorial
Jsp tutorial
 

Último

Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
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_...Pooja Bhuva
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 

Último (20)

Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.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_...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

Jsp viva questions

  • 1. JSP Viva Questions Q: What is JSP? A: JavaServer Pages (JSP) is a technologyfor developing web pages that support dynamic content which helps developers insertjava code in HTML pages by making use of special JSP tags, most of which start with <% and end with %>. Q: What are advantages of using JSP? A: JSP offer several advantages as listed below:  Performance is significantly better because JSP allows embedding Dynamic Elements in HTML Pages itself.  JSP are always compiled before it's processed bythe server unlike CGI/Perl which requires the server to load an interpreter and the target script each time the page is requested.  JavaServer Pages are built on top of the Java Servlets API, so like Servlets, JSP also has access to all the powerful Enterprise Java APIs, including JDBC, JNDI, EJB, JAXP etc.  JSP pages can be used in combination with servlets thathandle the business logic,the model supported by Java servlet template engines. Q: What are the advantages of JSP over Active Server Pages (ASP)? A: The advantages of JSP are twofold. First, the dynamic part is written in Java, not Visual Basic or other MS specific language, so it is more powerful and easier to use. Second, it is portable to other operating systems and non-Microsoft Web servers. Q: What are the advantages of JSP over Pure Servlets? A: It is more convenient to write (and to modify!) regular HTML than to have plenty of println statements that generate the HTML. Other advantages are:  Embedding of Java code in HTML pages.  Platform independence.  Creation of database-driven Web applications.  Server-side programming capabilities. Q: What are the advantages of JSP over Server-Side Includes (SSI)? A: SSI is really only intended for simple inclusions, not for "real" programs that use form data, make database connections, and the like. Q: What are the advantages of JSP over JavaScript? A: JavaScript can generate HTML dynamicallyon the clientbut can hardly interactwith the web server to perform complex tasks like database access and image processing etc. Q: What are the advantages of JSP over Static HTML? A: Regular HTML, of course, cannot contain dynamic information. Q: Explain lifecycle of a JSP. A:A JSP Lifecycle consists of following steps:  Compilation: When a browser asks for a JSP, the JSP engine firstchecks to see whether it needs to compile the page.If the page has never been compiled, or if the JSP has been modified since it was last compiled, the JSP engine compiles the page. The compilation process involves three steps: o Parsing the JSP. o Turning the JSP into a servlet. o Compiling the servlet.
  • 2.  Initialization: When a container loads a JSP it invokes the jspInit() method before servicing any requests  Execution: Whenever a browser requests a JSP and the page has been loaded and initialized, the JSP engine invokes the _jspService() method in the JSP.The _jspService() method of a JSP is invoked once per a request and is responsible for generating the response for that requestand this method is also responsible for generating responses to all seven of the HTTP methods ie. GET, POST, DELETE etc.  Cleanup: The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a container.The jspDestroy() method is the JSP equivalent of the destroy method for servlets.