SlideShare uma empresa Scribd logo
1 de 10
DEPARTMENT OF COMPUTER
SCIENCE
ANATOMY OF A JSP PAGE & JSP
SYNTAX
BY
NADAR SARASWATHI
COLLEGE OF ATRS AND SCIENCE,THENI.
JSP PAGE
 A JSP is a normal web page with JSP
elements for generating the parts of the web
page that differ for each request.
 A simple JSP web page that contains the JSP
elements and template text.
 Everything on the page that is not a JSP
element is called template text.
 Template text can be any text , i.e.,
HTML,XML,WML or even plain text.jsp has no
dependency on HTML ,it can be used with
any markup language.
 Template text is always passed straight to the
browser
JSP ELEMENTS
 There are three types of JSP elements
present:
 Action
 Directive
 Scripting
DIRECTIVE ELEMENT
 Define page-dependent attributes , such as
session tracking , error page , and buffering
requirement
 Is used for importing a package.
 Is used for handling an exception.
EXAMPLE:
<%@ include file=“filename” %>
<%@ include file=“header.jsp” %>
ACTION TAG/ELEMENT:
 JSP acti0n tags or element are used to
perform some specific tasks.
 The action tags are used to control the flow
between pages to use java beans.
 There are many JSP action tags.
 Jsp : forward : forward the request and
response to another resources.
 Jsp : include: include another resources.
SCRIPTING ELEMENT:
 Scriplet elements must be written within the
<%....%> tags.
 The scriptlets tag allows writing java code
statement within the jsp page.
 There are three main subdivision of scripting
elements in java server pages:
 Expression tag
 Scriptlets tag
 Declaration tag
JSP SYNTAX:
JSP DECLARATION:
 A Declaration declares one or more variable or
methods that you can use in java code later in
the jsp file.
 You must declare the variable or methods before
you use it in the jsp file.
XML EQUIVALENT:
<jsp:declaration>
code fragment
</jsp:declaration>
JSP EXPRESSION:
 A JSP expression element contains a scripting
language expression that is evaluated ,
converted to a string, and inserted where the
expression appears in the jsp file.
 Because the value of an expression is
converted to a string, you can use an
expression within a line of text , whether print
it is tagged HTML , in a JSP file.
Thank you

Mais conteúdo relacionado

Mais procurados

Visibility control in java
Visibility control in javaVisibility control in java
Visibility control in java
Tech_MX
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
Jafar Nesargi
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
koolkampus
 

Mais procurados (20)

4 memory management bb
4   memory management bb4   memory management bb
4 memory management bb
 
Visibility control in java
Visibility control in javaVisibility control in java
Visibility control in java
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Servlet and servlet life cycle
Servlet and servlet life cycleServlet and servlet life cycle
Servlet and servlet life cycle
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
 
Java rmi
Java rmiJava rmi
Java rmi
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
 
state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UML
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
 
Vectors in Java
Vectors in JavaVectors in Java
Vectors in Java
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction Modeling
 
Presentation on-exception-handling
Presentation on-exception-handlingPresentation on-exception-handling
Presentation on-exception-handling
 
Implicit object.pptx
Implicit object.pptxImplicit object.pptx
Implicit object.pptx
 
Js ppt
Js pptJs ppt
Js ppt
 
Servlets
ServletsServlets
Servlets
 
Event handling
Event handlingEvent handling
Event handling
 
Types and roles
Types and rolesTypes and roles
Types and roles
 

Semelhante a anatomy of a jsp page & jsp syntax.pptx

3.jsp tutorial
3.jsp tutorial3.jsp tutorial
3.jsp tutorial
shiva404
 
Jsp interview questions by java training center
Jsp interview questions by java training centerJsp interview questions by java training center
Jsp interview questions by java training center
Maheshit Jtc
 

Semelhante a anatomy of a jsp page & jsp syntax.pptx (20)

Java server pages
Java server pagesJava server pages
Java server pages
 
Introduction to JSP.pptx
Introduction to JSP.pptxIntroduction to JSP.pptx
Introduction to JSP.pptx
 
Jsp in Servlet by Rj
Jsp in Servlet by RjJsp in Servlet by Rj
Jsp in Servlet by Rj
 
JSP.pptx
JSP.pptxJSP.pptx
JSP.pptx
 
Jsp Introduction Tutorial
Jsp Introduction TutorialJsp Introduction Tutorial
Jsp Introduction Tutorial
 
JSP
JSPJSP
JSP
 
Java server pages
Java server pagesJava server pages
Java server pages
 
Java Web Programming [4/9] : JSP Basic
Java Web Programming [4/9] : JSP BasicJava Web Programming [4/9] : JSP Basic
Java Web Programming [4/9] : JSP Basic
 
Jsp
JspJsp
Jsp
 
3.jsp tutorial
3.jsp tutorial3.jsp tutorial
3.jsp tutorial
 
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
 
Jsp
JspJsp
Jsp
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Card12
Card12Card12
Card12
 
JSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESJSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGES
 
Introduction to JSP pages
Introduction to JSP pagesIntroduction to JSP pages
Introduction to JSP pages
 
Jsp interview questions by java training center
Jsp interview questions by java training centerJsp interview questions by java training center
Jsp interview questions by java training center
 
Jsp tutorial
Jsp tutorialJsp tutorial
Jsp tutorial
 

Mais de Sameenafathima4 (15)

ai.pptx
ai.pptxai.pptx
ai.pptx
 
dip.pptx
dip.pptxdip.pptx
dip.pptx
 
iot.pptx
iot.pptxiot.pptx
iot.pptx
 
women empowerment.pptx
women empowerment.pptxwomen empowerment.pptx
women empowerment.pptx
 
CLOUD COMPUTING.pptx
CLOUD COMPUTING.pptxCLOUD COMPUTING.pptx
CLOUD COMPUTING.pptx
 
crypto.pptx
crypto.pptxcrypto.pptx
crypto.pptx
 
crypto.pptx
crypto.pptxcrypto.pptx
crypto.pptx
 
nosql.pptx
nosql.pptxnosql.pptx
nosql.pptx
 
Features of Android OS.pptx
Features of Android OS.pptxFeatures of Android OS.pptx
Features of Android OS.pptx
 
python p.pptx
python p.pptxpython p.pptx
python p.pptx
 
Creating windows
Creating windowsCreating windows
Creating windows
 
Code optimization
Code optimizationCode optimization
Code optimization
 
Swing components
Swing components Swing components
Swing components
 
dsa.pptx
dsa.pptxdsa.pptx
dsa.pptx
 
JAVA SERVER PAGE
JAVA SERVER PAGEJAVA SERVER PAGE
JAVA SERVER PAGE
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).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_...
 
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
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
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
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
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
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.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
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 

anatomy of a jsp page & jsp syntax.pptx

  • 1. DEPARTMENT OF COMPUTER SCIENCE ANATOMY OF A JSP PAGE & JSP SYNTAX BY NADAR SARASWATHI COLLEGE OF ATRS AND SCIENCE,THENI.
  • 2. JSP PAGE  A JSP is a normal web page with JSP elements for generating the parts of the web page that differ for each request.  A simple JSP web page that contains the JSP elements and template text.  Everything on the page that is not a JSP element is called template text.
  • 3.  Template text can be any text , i.e., HTML,XML,WML or even plain text.jsp has no dependency on HTML ,it can be used with any markup language.  Template text is always passed straight to the browser
  • 4. JSP ELEMENTS  There are three types of JSP elements present:  Action  Directive  Scripting
  • 5. DIRECTIVE ELEMENT  Define page-dependent attributes , such as session tracking , error page , and buffering requirement  Is used for importing a package.  Is used for handling an exception. EXAMPLE: <%@ include file=“filename” %> <%@ include file=“header.jsp” %>
  • 6. ACTION TAG/ELEMENT:  JSP acti0n tags or element are used to perform some specific tasks.  The action tags are used to control the flow between pages to use java beans.  There are many JSP action tags.  Jsp : forward : forward the request and response to another resources.  Jsp : include: include another resources.
  • 7. SCRIPTING ELEMENT:  Scriplet elements must be written within the <%....%> tags.  The scriptlets tag allows writing java code statement within the jsp page.  There are three main subdivision of scripting elements in java server pages:  Expression tag  Scriptlets tag  Declaration tag
  • 8. JSP SYNTAX: JSP DECLARATION:  A Declaration declares one or more variable or methods that you can use in java code later in the jsp file.  You must declare the variable or methods before you use it in the jsp file. XML EQUIVALENT: <jsp:declaration> code fragment </jsp:declaration>
  • 9. JSP EXPRESSION:  A JSP expression element contains a scripting language expression that is evaluated , converted to a string, and inserted where the expression appears in the jsp file.  Because the value of an expression is converted to a string, you can use an expression within a line of text , whether print it is tagged HTML , in a JSP file.