SlideShare a Scribd company logo
By: Sanghavi Infosoft Pvt. Ltd.
In JSP, special tags are used to embed
dynamic content generation code into a HTML
page.
Following types of tags are used in JSP:
1. Scriptlet Tag
2. Declaration Tag
3. Expression Tag
4. Directive Tag
5. Action Tag



All the statements which are placed within
scriptlets are moved to _jspService() method with
Auto Generated Servlet at the time of translation.
Syntax-
Jsp , javasportal, jsp basic,


Within a scriptlet following implicit objects
are made available to a JSP programmer:

* represents, is not available by default in all JSP pages.


This tag is used to define data members &
methods in the Auto Generated Servlet.
Syntax-

<%!

%>

datamember
&
method definition
Jsp , javasportal, jsp basic,


This tag is used to write a String or String
returning expression to the Output Stream. In
other words, this tag provides a shorthand
mechanism of writing strings or String
returning expressions to output stream.

Example-
$


Directives Tags are used to provide
information to the JSP translator. This
information is used by the translator at the
time of creating Servlet from the JSP.
There are 3 types of directives in JSP:
1. page directive
2. include directive
3. taglib directive



This directive is used to provide information
such as base class for Auto Generated Servlet,
packages to be imported, content type to be
set, URL of error handler page etc.

Syntax<%@ page attribute=“value” %>
Jsp , javasportal, jsp basic,


This directive is used to include the contents
of a resource to the response of current JSP.
Syntax<%@ include

file=”URL of Resource” %>

$


taglib directive is used to specify the location of a
TLD (Tag Library Descriptor) file that defines many
tags.
Syntax<%@ taglib uri=“uniqueIdentifier/path of tld file” prefix=“prefixOfTagLibrary” %>

Example<%@ taglib uri=“http://www.rupendra.co.cc/tags” prefix=“mytag” %>

Note:
We will use this tag in custom tag section so it will
be better to learn it in custom tag.




This tag is used to generate code within
_jspService() method for performing some
action such as creating an object, setting its
properties, including the contents of the
resource, forwarding the request to another
resource, etc.
The action tags basically are used to control
the flow between pages and to use java
beans.
1.
2.

3.
4.
5.
6.
7.

<jsp:forward>
<jsp:include>
<jsp:useBean>
<jsp:setProperty>
<jsp:getProperty>
<jsp:param>
etc.


The <jsp:forward> action tag is used to
forward the request to another resource it
may be jsp, html or another resource.

$


The <jsp:include> action tag is used to include
the content of another resource it may be jsp,
HTML or Servlet.

Advantage of <jsp:include> action tag:
1.
Code reusability

$

More Related Content

PPTX
PPTX
Jsp session 5
PPTX
Jsp session 4
PPT
Web&java. jsp
PPTX
Learning jsp
PPTX
JavaScript with Syntax & Implementation
PPTX
Jsp session 5
Jsp session 4
Web&java. jsp
Learning jsp
JavaScript with Syntax & Implementation

What's hot (20)

DOC
Jsp advance part i
PPT
Unified Expression Language
PDF
19servlets
DOC
JSP Scope variable And Data Sharing
PPT
Jsp Presentation +Mufix "3"
PDF
Intro to Javascript and jQuery
PDF
Intro to jQuery
PPT
J Query
PPT
Rich faces
PPT
JSP Processing
PPTX
Basics of Javascript
DOCX
Html To JSP
DOCX
Filters in AngularJS
DOCX
Controller in AngularJS
PPT
Java Server Faces (JSF) - advanced
ODP
JavaScript and jQuery Fundamentals
DOCX
Java script basics
PPTX
Java Script
DOCX
Built in filters
PDF
Rspec API Documentation
Jsp advance part i
Unified Expression Language
19servlets
JSP Scope variable And Data Sharing
Jsp Presentation +Mufix "3"
Intro to Javascript and jQuery
Intro to jQuery
J Query
Rich faces
JSP Processing
Basics of Javascript
Html To JSP
Filters in AngularJS
Controller in AngularJS
Java Server Faces (JSF) - advanced
JavaScript and jQuery Fundamentals
Java script basics
Java Script
Built in filters
Rspec API Documentation
Ad

Similar to Jsp , javasportal, jsp basic, (20)

PPTX
JSP Directives
PPTX
SCWCD : Java server pages CHAP : 9
PPTX
JSP AND XML USING JAVA WITH GET AND POST METHODS
PPTX
Jsp elements
PDF
PPTX
4. jsp
PPTX
Introduction to JSP
PPTX
JSP_Complete_Guide_With_Step_By_Step_solution
PPTX
Introduction to JSP.pptx
PPTX
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
PPTX
JSP.pptx programming guide for beginners and experts
PPTX
JSP.pptx
PPTX
JSP Directives IMPLICIT ACTIONS and HACKING.pptx
PPTX
JSP- JAVA SERVER PAGES
PPT
Session 5 : intro to jsp - Giáo trình Bách Khoa Aptech
PPTX
Session 37 - JSP - Part 2 (final)
PPT
Jsp ppt
PPT
Jsp sasidhar
PPTX
Java Server Pages
JSP Directives
SCWCD : Java server pages CHAP : 9
JSP AND XML USING JAVA WITH GET AND POST METHODS
Jsp elements
4. jsp
Introduction to JSP
JSP_Complete_Guide_With_Step_By_Step_solution
Introduction to JSP.pptx
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
JSP.pptx programming guide for beginners and experts
JSP.pptx
JSP Directives IMPLICIT ACTIONS and HACKING.pptx
JSP- JAVA SERVER PAGES
Session 5 : intro to jsp - Giáo trình Bách Khoa Aptech
Session 37 - JSP - Part 2 (final)
Jsp ppt
Jsp sasidhar
Java Server Pages
Ad

Recently uploaded (20)

PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Computing-Curriculum for Schools in Ghana
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
Lesson notes of climatology university.
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Microbial disease of the cardiovascular and lymphatic systems
History, Philosophy and sociology of education (1).pptx
Chinmaya Tiranga quiz Grand Finale.pdf
Microbial diseases, their pathogenesis and prophylaxis
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
What if we spent less time fighting change, and more time building what’s rig...
Computing-Curriculum for Schools in Ghana
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
LDMMIA Reiki Yoga Finals Review Spring Summer
Lesson notes of climatology university.
Weekly quiz Compilation Jan -July 25.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf

Jsp , javasportal, jsp basic,

  • 2. In JSP, special tags are used to embed dynamic content generation code into a HTML page. Following types of tags are used in JSP: 1. Scriptlet Tag 2. Declaration Tag 3. Expression Tag 4. Directive Tag 5. Action Tag 
  • 3.  All the statements which are placed within scriptlets are moved to _jspService() method with Auto Generated Servlet at the time of translation. Syntax-
  • 5.  Within a scriptlet following implicit objects are made available to a JSP programmer: * represents, is not available by default in all JSP pages.
  • 6.  This tag is used to define data members & methods in the Auto Generated Servlet. Syntax- <%! %> datamember & method definition
  • 8.  This tag is used to write a String or String returning expression to the Output Stream. In other words, this tag provides a shorthand mechanism of writing strings or String returning expressions to output stream. Example-
  • 9. $
  • 10.  Directives Tags are used to provide information to the JSP translator. This information is used by the translator at the time of creating Servlet from the JSP.
  • 11. There are 3 types of directives in JSP: 1. page directive 2. include directive 3. taglib directive 
  • 12.  This directive is used to provide information such as base class for Auto Generated Servlet, packages to be imported, content type to be set, URL of error handler page etc. Syntax<%@ page attribute=“value” %>
  • 14.  This directive is used to include the contents of a resource to the response of current JSP. Syntax<%@ include file=”URL of Resource” %> $
  • 15.  taglib directive is used to specify the location of a TLD (Tag Library Descriptor) file that defines many tags. Syntax<%@ taglib uri=“uniqueIdentifier/path of tld file” prefix=“prefixOfTagLibrary” %> Example<%@ taglib uri=“http://www.rupendra.co.cc/tags” prefix=“mytag” %> Note: We will use this tag in custom tag section so it will be better to learn it in custom tag.
  • 16.   This tag is used to generate code within _jspService() method for performing some action such as creating an object, setting its properties, including the contents of the resource, forwarding the request to another resource, etc. The action tags basically are used to control the flow between pages and to use java beans.
  • 18.  The <jsp:forward> action tag is used to forward the request to another resource it may be jsp, html or another resource. $
  • 19.  The <jsp:include> action tag is used to include the content of another resource it may be jsp, HTML or Servlet. Advantage of <jsp:include> action tag: 1. Code reusability $