SlideShare une entreprise Scribd logo
1  sur  9
Java Server Pages JSP, JSTL, and Servlets
Topics What is JSP What is JSTL What is a Servlet? What are Beans? JSP Access Models Benefits and Shortcomings Samples Questions / Comments
What is JSP? JavaServer Pages enable Web developers and designers to rapidly develop and easily maintain, information-rich, dynamic Web pages that leverage existing business systems. JSP technology enables development of Web-based applications that are platform independent. JSP technology separates the user interface from content generation, enabling designers to easily change the overall page layout without altering the underlying dynamic content.
What is JSTL? The JavaServer Pages Standard Tag Library (JSTL) encapsulates core functionality common to many web applications. single, standard set of tags. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags. Examples: 1: <c:forEach var="item“ items="${sessionScope.cart.items}">  	<tr><td> 		<c:out value=“${item.name}”></td> 		<td><c:out value=“${item.price}”> 	</td></tr> </c:forEach> 2: <c:choose>    <c:when test='${param.responseText == “Fail"}'>		<b>There was an error!</b>    </c:when> 	<c:otherwise> 		Everything is great! 	</c:otherwise>  </c:choose>
What is a Servlet? Java Servlet technology provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and for accessing existing business systems A servlet can almost be thought of as an applet that runs on the server side--without a face.  Servlets have access to the entire family of Java APIs, including the JDBC API to access enterprise databases. Servlets can also access a library of HTTP-specific calls and receive all the benefits of the mature Java language, including portability, performance, reusability, and crash protection. Servlet: package silenceit;public class Hello{  public String show(){    return ”Hello”;  }} JSP Page: <%@page import=“silenceit.hello" %> <html>   <head>     <title>        Example of page Directive in JSP     </title>   </head>   <body>     <%        Hello he = new Hello(); out.print(he.show());      %>   </body> </html>
What are Beans? Java Beans are reusable components. They are used to separate Business logic from the Presentation logic. Internally, a bean is just an instance of a class with special naming conventions and characteristics. Bean Conventions: In order to function as a JavaBean class, an object class must obey certain conventions about method naming, construction, and behavior. These conventions make it possible to have tools that can use, reuse, replace, and connect JavaBeans. The class must have a public default constructor. This allows easy instantiation within editing and activation frameworks. The class properties must be accessible using get, set, and other methods (so-called accessor methods and mutator methods), following a standard naming convention. This allows easy automated inspection and updating of bean state within frameworks, many of which include custom editors for various types of properties. The class should be serializable. This allows applications and frameworks to reliably save, store, and restore the bean's state in a fashion that is independent of the VM and platform. Example Bean: publicclassPersonBeanimplementsjava.io.Serializable {    private String name;    privateboolean deceased;     /** No-arg constructor*/    publicPersonBean() {    }     /** * Property */    public String getName() { returnthis.name;    }     /** * Setter for property Name */ publicvoidsetName(final String name) {       this.name = name;    }   /** * Getter for property "deceased" * Different syntax for a boolean field (is vs. get) */    publicbooleanisDeceased() {       returnthis.deceased;    }    /** * Setter for property deceased */ publicvoidsetDeceased(finalboolean deceased) {      this.deceased = deceased;    } }
JSP Access Models The early JSP specifications advocated two philosophical approaches, popularly known as Model 1 and Model 2 architectures, for applying JSP technology. These approaches differ essentially in the location at which the bulk of the request processing is performed Model 1 Model 2 The Model 2 architecture, shown above, is a server-side implementation of the popular Model/View/Controller design pattern. Here, the processing is divided between presentation and front components. Presentation components are JSP pages that generate the HTML/XML response that determines the user interface when rendered by the browser. Front components (also known as controllers) do not handle any presentation issues, but rather, process all the HTTP requests Although the Model 1 architecture is suitable for simple applications, it may not be desirable for complex implementations. Indiscriminate usage of this architecture usually leads to a significant amount of scriptlets or Java code embedded within the JSP page
Benefits and Shortcomings JSP Benefits: Platform and Server Independence Open Development Process, Open Source Extensible JSP Tags Application persistence and variable scopes Mature Java language Easier Maintenance Scripting languages are fine for small applications, but do not scale well to manage large, complex applications. Because the Java language is structured, it is easier to build and maintain large, modular applications with it. JSP technology's emphasis on components over scripting makes it easier to revise content without affecting logic, or revise logic without changing content. The Enterprise JavaBeans architecture encapsulates the enterprise logic, such as database access, security, and transaction integrity, and isolates it from the application itself. Because JSP technology is an open, cross-platform architecture, Web servers, platforms, and other components can be easily upgraded or switched without affecting JSP-based applications. This makes JSP suitable for real-world Web applications, where constant change and growth is the norm. Security Since JSP can interoperate with standard Java it has access to the underlying Java SE Platforms extensible security architecture . Security features — cryptography, authentication and authorization, public key infrastructure, and more. JSP Shortcomings: ,[object Object]
JSP Typically issues poor error reports

Contenu connexe

Tendances

JSP Processing
JSP ProcessingJSP Processing
JSP ProcessingSadhana28
 
Jsf2 overview
Jsf2 overviewJsf2 overview
Jsf2 overviewsohan1234
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2divzi1913
 
1.jsp application models
1.jsp application models1.jsp application models
1.jsp application modelsweb360
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationIMC Institute
 
Introduction to Java EE (J2EE)
Introduction to Java EE (J2EE)Introduction to Java EE (J2EE)
Introduction to Java EE (J2EE)Atit Patumvan
 
Entity beans in java
Entity beans in javaEntity beans in java
Entity beans in javaAcp Jamod
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)Fred Rowe
 
Lecture 8 Enterprise Java Beans (EJB)
Lecture 8  Enterprise Java Beans (EJB)Lecture 8  Enterprise Java Beans (EJB)
Lecture 8 Enterprise Java Beans (EJB)Fahad Golra
 

Tendances (20)

JSP Processing
JSP ProcessingJSP Processing
JSP Processing
 
Jsf2 overview
Jsf2 overviewJsf2 overview
Jsf2 overview
 
Jsp
JspJsp
Jsp
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
Jsf+ejb 50
Jsf+ejb 50Jsf+ejb 50
Jsf+ejb 50
 
Java server pages
Java server pagesJava server pages
Java server pages
 
1.jsp application models
1.jsp application models1.jsp application models
1.jsp application models
 
Java J2EE
Java J2EEJava J2EE
Java J2EE
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web Application
 
Introduction to Java EE (J2EE)
Introduction to Java EE (J2EE)Introduction to Java EE (J2EE)
Introduction to Java EE (J2EE)
 
JSP Technology I
JSP Technology IJSP Technology I
JSP Technology I
 
Jspx Jdc2010
Jspx Jdc2010Jspx Jdc2010
Jspx Jdc2010
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Unit 07: Design Patterns and Frameworks (3/3)
Unit 07: Design Patterns and Frameworks (3/3)Unit 07: Design Patterns and Frameworks (3/3)
Unit 07: Design Patterns and Frameworks (3/3)
 
JSP Technology II
JSP Technology IIJSP Technology II
JSP Technology II
 
Entity beans in java
Entity beans in javaEntity beans in java
Entity beans in java
 
OpenESB
OpenESBOpenESB
OpenESB
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
 
Lecture 8 Enterprise Java Beans (EJB)
Lecture 8  Enterprise Java Beans (EJB)Lecture 8  Enterprise Java Beans (EJB)
Lecture 8 Enterprise Java Beans (EJB)
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
 

En vedette

Eco eko - listado de ingredientes peligrosos en cosmética
Eco eko - listado de ingredientes peligrosos en cosméticaEco eko - listado de ingredientes peligrosos en cosmética
Eco eko - listado de ingredientes peligrosos en cosméticaBioAlai
 
Square meter investigation new
Square meter investigation newSquare meter investigation new
Square meter investigation newgrade4biss
 
2015 Fall Conference: ISOSWO Lightning Round-Terracon
2015 Fall Conference: ISOSWO Lightning Round-Terracon2015 Fall Conference: ISOSWO Lightning Round-Terracon
2015 Fall Conference: ISOSWO Lightning Round-Terraconisoswo
 
Diapsitivas vicente
Diapsitivas vicenteDiapsitivas vicente
Diapsitivas vicentejose1707
 
2015 Fall Conference: Public Meeting, Admin and HR-Brick
2015 Fall Conference: Public Meeting, Admin and HR-Brick2015 Fall Conference: Public Meeting, Admin and HR-Brick
2015 Fall Conference: Public Meeting, Admin and HR-Brickisoswo
 
Projeto Prioritário
Projeto PrioritárioProjeto Prioritário
Projeto Prioritáriodite2009
 
Znaky a symboly
Znaky a symbolyZnaky a symboly
Znaky a symbolyJane Down
 
NEW RESUME_F_2016_ERVIN
NEW RESUME_F_2016_ERVINNEW RESUME_F_2016_ERVIN
NEW RESUME_F_2016_ERVINKeondae Ervin
 
2015 Fall Conference: Closed Loop Fund Essentials
2015 Fall Conference: Closed Loop Fund Essentials2015 Fall Conference: Closed Loop Fund Essentials
2015 Fall Conference: Closed Loop Fund Essentialsisoswo
 
Zethofer Efraim 2015 heb-en
Zethofer Efraim 2015   heb-enZethofer Efraim 2015   heb-en
Zethofer Efraim 2015 heb-enEfraim Zethofer
 
2015 Fall Conference: Avian Influenza-USDA
2015 Fall Conference: Avian Influenza-USDA2015 Fall Conference: Avian Influenza-USDA
2015 Fall Conference: Avian Influenza-USDAisoswo
 

En vedette (20)

Presentation
PresentationPresentation
Presentation
 
Jsp sasidhar
Jsp sasidharJsp sasidhar
Jsp sasidhar
 
Agropecuaria
AgropecuariaAgropecuaria
Agropecuaria
 
Eco eko - listado de ingredientes peligrosos en cosmética
Eco eko - listado de ingredientes peligrosos en cosméticaEco eko - listado de ingredientes peligrosos en cosmética
Eco eko - listado de ingredientes peligrosos en cosmética
 
Square meter investigation new
Square meter investigation newSquare meter investigation new
Square meter investigation new
 
Resume
ResumeResume
Resume
 
Agenda 15
Agenda  15Agenda  15
Agenda 15
 
Agenda 25
Agenda 25Agenda 25
Agenda 25
 
2015 Fall Conference: ISOSWO Lightning Round-Terracon
2015 Fall Conference: ISOSWO Lightning Round-Terracon2015 Fall Conference: ISOSWO Lightning Round-Terracon
2015 Fall Conference: ISOSWO Lightning Round-Terracon
 
Diapsitivas vicente
Diapsitivas vicenteDiapsitivas vicente
Diapsitivas vicente
 
2015 Fall Conference: Public Meeting, Admin and HR-Brick
2015 Fall Conference: Public Meeting, Admin and HR-Brick2015 Fall Conference: Public Meeting, Admin and HR-Brick
2015 Fall Conference: Public Meeting, Admin and HR-Brick
 
CWP, Dr Ravi
CWP, Dr RaviCWP, Dr Ravi
CWP, Dr Ravi
 
Projeto Prioritário
Projeto PrioritárioProjeto Prioritário
Projeto Prioritário
 
Znaky a symboly
Znaky a symbolyZnaky a symboly
Znaky a symboly
 
TREBALL_aRt
TREBALL_aRtTREBALL_aRt
TREBALL_aRt
 
NEW RESUME_F_2016_ERVIN
NEW RESUME_F_2016_ERVINNEW RESUME_F_2016_ERVIN
NEW RESUME_F_2016_ERVIN
 
2015 Fall Conference: Closed Loop Fund Essentials
2015 Fall Conference: Closed Loop Fund Essentials2015 Fall Conference: Closed Loop Fund Essentials
2015 Fall Conference: Closed Loop Fund Essentials
 
Zethofer Efraim 2015 heb-en
Zethofer Efraim 2015   heb-enZethofer Efraim 2015   heb-en
Zethofer Efraim 2015 heb-en
 
2015 Fall Conference: Avian Influenza-USDA
2015 Fall Conference: Avian Influenza-USDA2015 Fall Conference: Avian Influenza-USDA
2015 Fall Conference: Avian Influenza-USDA
 
Jsp(java server pages)
Jsp(java server pages)Jsp(java server pages)
Jsp(java server pages)
 

Similaire à JavaServer Pages

Struts 2 Overview
Struts 2 OverviewStruts 2 Overview
Struts 2 Overviewskill-guru
 
Transformation of Java Server Pages: A Modern Approach
Transformation of Java Server Pages: A Modern ApproachTransformation of Java Server Pages: A Modern Approach
Transformation of Java Server Pages: A Modern ApproachIRJET Journal
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2Long Nguyen
 
J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenlissa cidhi
 
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
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
Comparative Display Technologies
Comparative Display TechnologiesComparative Display Technologies
Comparative Display Technologiesjiali zhang
 
PPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to serverPPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to servershivanichourasia01
 
Csajsp Chapter10
Csajsp Chapter10Csajsp Chapter10
Csajsp Chapter10Adil Jafri
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...WebStackAcademy
 

Similaire à JavaServer Pages (20)

Struts 2 Overview
Struts 2 OverviewStruts 2 Overview
Struts 2 Overview
 
Transformation of Java Server Pages: A Modern Approach
Transformation of Java Server Pages: A Modern ApproachTransformation of Java Server Pages: A Modern Approach
Transformation of Java Server Pages: A Modern Approach
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
Spatial approximate string search Doc
Spatial approximate string search DocSpatial approximate string search Doc
Spatial approximate string search Doc
 
J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for women
 
Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course
 
JEE5 New Features
JEE5 New FeaturesJEE5 New Features
JEE5 New Features
 
Java part 3
Java part  3Java part  3
Java part 3
 
Jsp in Servlet by Rj
Jsp in Servlet by RjJsp in Servlet by Rj
Jsp in Servlet by Rj
 
C:\fakepath\jsp01
C:\fakepath\jsp01C:\fakepath\jsp01
C:\fakepath\jsp01
 
JSP.pptx
JSP.pptxJSP.pptx
JSP.pptx
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Jsf2 overview
Jsf2 overviewJsf2 overview
Jsf2 overview
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
Comparative Display Technologies
Comparative Display TechnologiesComparative Display Technologies
Comparative Display Technologies
 
PPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to serverPPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to server
 
Csajsp Chapter10
Csajsp Chapter10Csajsp Chapter10
Csajsp Chapter10
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
 

Plus de silenceIT Inc.

Plus de silenceIT Inc. (10)

PHP6 and HTML5
PHP6 and HTML5PHP6 and HTML5
PHP6 and HTML5
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introduction
 
Google Gears
Google GearsGoogle Gears
Google Gears
 
Prototype Seminar
Prototype SeminarPrototype Seminar
Prototype Seminar
 
PHP-IDS
PHP-IDSPHP-IDS
PHP-IDS
 
Bing Webmaster
Bing WebmasterBing Webmaster
Bing Webmaster
 
Joomla-Content Management System
Joomla-Content Management SystemJoomla-Content Management System
Joomla-Content Management System
 
JavaScript Leaks
JavaScript LeaksJavaScript Leaks
JavaScript Leaks
 
JeOS "Juice"
JeOS "Juice"JeOS "Juice"
JeOS "Juice"
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 

Dernier

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Dernier (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

JavaServer Pages

  • 1. Java Server Pages JSP, JSTL, and Servlets
  • 2. Topics What is JSP What is JSTL What is a Servlet? What are Beans? JSP Access Models Benefits and Shortcomings Samples Questions / Comments
  • 3. What is JSP? JavaServer Pages enable Web developers and designers to rapidly develop and easily maintain, information-rich, dynamic Web pages that leverage existing business systems. JSP technology enables development of Web-based applications that are platform independent. JSP technology separates the user interface from content generation, enabling designers to easily change the overall page layout without altering the underlying dynamic content.
  • 4. What is JSTL? The JavaServer Pages Standard Tag Library (JSTL) encapsulates core functionality common to many web applications. single, standard set of tags. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags. Examples: 1: <c:forEach var="item“ items="${sessionScope.cart.items}"> <tr><td> <c:out value=“${item.name}”></td> <td><c:out value=“${item.price}”> </td></tr> </c:forEach> 2: <c:choose> <c:when test='${param.responseText == “Fail"}'> <b>There was an error!</b> </c:when> <c:otherwise> Everything is great! </c:otherwise> </c:choose>
  • 5. What is a Servlet? Java Servlet technology provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and for accessing existing business systems A servlet can almost be thought of as an applet that runs on the server side--without a face. Servlets have access to the entire family of Java APIs, including the JDBC API to access enterprise databases. Servlets can also access a library of HTTP-specific calls and receive all the benefits of the mature Java language, including portability, performance, reusability, and crash protection. Servlet: package silenceit;public class Hello{  public String show(){    return ”Hello”;  }} JSP Page: <%@page import=“silenceit.hello" %> <html> <head> <title> Example of page Directive in JSP </title> </head> <body> <% Hello he = new Hello(); out.print(he.show()); %> </body> </html>
  • 6. What are Beans? Java Beans are reusable components. They are used to separate Business logic from the Presentation logic. Internally, a bean is just an instance of a class with special naming conventions and characteristics. Bean Conventions: In order to function as a JavaBean class, an object class must obey certain conventions about method naming, construction, and behavior. These conventions make it possible to have tools that can use, reuse, replace, and connect JavaBeans. The class must have a public default constructor. This allows easy instantiation within editing and activation frameworks. The class properties must be accessible using get, set, and other methods (so-called accessor methods and mutator methods), following a standard naming convention. This allows easy automated inspection and updating of bean state within frameworks, many of which include custom editors for various types of properties. The class should be serializable. This allows applications and frameworks to reliably save, store, and restore the bean's state in a fashion that is independent of the VM and platform. Example Bean: publicclassPersonBeanimplementsjava.io.Serializable { private String name; privateboolean deceased; /** No-arg constructor*/ publicPersonBean() { } /** * Property */ public String getName() { returnthis.name; } /** * Setter for property Name */ publicvoidsetName(final String name) { this.name = name; } /** * Getter for property "deceased" * Different syntax for a boolean field (is vs. get) */ publicbooleanisDeceased() { returnthis.deceased; } /** * Setter for property deceased */ publicvoidsetDeceased(finalboolean deceased) { this.deceased = deceased; } }
  • 7. JSP Access Models The early JSP specifications advocated two philosophical approaches, popularly known as Model 1 and Model 2 architectures, for applying JSP technology. These approaches differ essentially in the location at which the bulk of the request processing is performed Model 1 Model 2 The Model 2 architecture, shown above, is a server-side implementation of the popular Model/View/Controller design pattern. Here, the processing is divided between presentation and front components. Presentation components are JSP pages that generate the HTML/XML response that determines the user interface when rendered by the browser. Front components (also known as controllers) do not handle any presentation issues, but rather, process all the HTTP requests Although the Model 1 architecture is suitable for simple applications, it may not be desirable for complex implementations. Indiscriminate usage of this architecture usually leads to a significant amount of scriptlets or Java code embedded within the JSP page
  • 8.
  • 9. JSP Typically issues poor error reports
  • 10. JSP Pages use more disk space then regular scripting languages
  • 11. Need a solid knowledge of Java
  • 12. Some simple tasks are more difficult to perform
  • 13. Coding standards need to be diligently adhered to
  • 14.