Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
JSP ELEMENTS
BY
SANA MATEEN
3 Kinds of
Elements
Scripting Directive
Action
1. <%......%>
2. <%=……%>
3. <%!......%>
1. <%@page.......%>
2. <%@include.....
Jsp directive elements
• The jsp directives are messages that tells the web container how to translate a JSP
page into the...
The page Directive:
Following is the list of attributes associated with page directive:
Attribute Purpose
buffer Specifies...
Jsp Include Directive
• The include directive is used to include the contents of any resource it may
be jsp file, html fil...
JSP Taglib directive
• The JSP taglib directive is used to define a tag library that defines many
tags. We use the TLD (Ta...
Jsp Action Elements
• JSP Action Tags
• There are many JSP action tags or elements. Each JSP action tag is used
to perform...
Jsp param
• The <jsp:param> action is used to provide information in the form of
key/value pair.
• This action can be used...
Jsp elements
Jsp elements
Jsp elements
Jsp elements
Jsp elements
Jsp elements
Jsp elements
Jsp elements
Jsp elements
Jsp elements
Jsp elements
Upcoming SlideShare
Loading in …5
×

of

Jsp elements Slide 1 Jsp elements Slide 2 Jsp elements Slide 3 Jsp elements Slide 4 Jsp elements Slide 5 Jsp elements Slide 6 Jsp elements Slide 7 Jsp elements Slide 8 Jsp elements Slide 9 Jsp elements Slide 10 Jsp elements Slide 11 Jsp elements Slide 12 Jsp elements Slide 13 Jsp elements Slide 14 Jsp elements Slide 15 Jsp elements Slide 16 Jsp elements Slide 17 Jsp elements Slide 18 Jsp elements Slide 19
Upcoming SlideShare
Reading init param
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Jsp elements

Download to read offline

JSP Scripting elements,Directives,Action elements,Heart of all web application in java

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Jsp elements

  1. 1. JSP ELEMENTS BY SANA MATEEN
  2. 2. 3 Kinds of Elements Scripting Directive Action 1. <%......%> 2. <%=……%> 3. <%!......%> 1. <%@page.......%> 2. <%@include....%> 3. <%taglib….%> 1. <jsp:useBean> 2. <jsp:getProperty> 3. <jsp:setProperty> 4. <jsp:include> 5. <jsp:forward>
  3. 3. Jsp directive elements • The jsp directives are messages that tells the web container how to translate a JSP page into the corresponding servlet. • There are three types of directives: 1. page directive 2. include directive 3. taglib directive • The page directive defines attributes that apply to an entire JSP page. • Attributes of JSP page directive 1. import 2. contentType 3. extends 4. info 5. buffer 6. language 7. isELIgnored 8. isThreadSafe 9. autoFlush 10. session 11. pageEncoding 12. errorPage 13. isErrorPage
  4. 4. The page Directive: Following is the list of attributes associated with page directive: Attribute Purpose buffer Specifies a buffering model for the output stream. autoFlush Controls the behavior of the servlet output buffer. contentType Defines the character encoding scheme. errorPage Defines the URL of another JSP that reports on Java unchecked runtime exceptions. isErrorPage Indicates if this JSP page is a URL specified by another JSP page's errorPage attribute. extends Specifies a superclass that the generated servlet must extend import Specifies a list of packages or classes for use in the JSP as the Java import statement does for Java classes. info Defines a string that can be accessed with the servlet's getServletInfo() method. isThreadSafe Defines the threading model for the generated servlet. language Defines the programming language used in the JSP page. session Specifies whether or not the JSP page participates in HTTP sessions isELIgnored Specifies whether or not EL expression within the JSP page will be ignored. isScriptingEnabled Determines if scripting elements are allowed for use.
  5. 5. Jsp Include Directive • The include directive is used to include the contents of any resource it may be jsp file, html file or text file. The include directive includes the original content of the included resource at page translation time • Advantage of Include directive • Code Reusability • Syntax of include directive • <%@ include file="resourceName" %>
  6. 6. JSP Taglib directive • The JSP taglib directive is used to define a tag library that defines many tags. We use the TLD (Tag Library Descriptor) file to define the tags. In the custom tag section we will use this tag so it will be better to learn it in custom tag. • Syntax JSP Taglib directive • <%@ taglib uri="uriofthetaglibrary" prefix="prefixoftaglibrary" %>
  7. 7. Jsp Action Elements • JSP Action Tags • There are many JSP action tags or elements. Each JSP action tag is used to perform some specific tasks. • The action tags are used to control the flow between pages If plugin is not working
  8. 8. Jsp param • The <jsp:param> action is used to provide information in the form of key/value pair. • This action can be used as direct child element of the following actions: <jsp:include>, <jsp:forward> and <jsp:params> (which is a child element of the <jsp:plugin> action). • The JSP compiler will issue a translation error if this element is used elsewhere. • Syntax • The <jsp:param> action has pretty simple and straightforward syntax: • <jsp:param name="paramName" value="paramValue" /> • Both of the attributes paramName and paramValue are mandatory, and the paramValue can accept a runtime expression. • For the <jsp:include> and <jsp:forward> actions, the parameters will be added to the request object of the included page and forwarded page

JSP Scripting elements,Directives,Action elements,Heart of all web application in java

Views

Total views

1,213

On Slideshare

0

From embeds

0

Number of embeds

149

Actions

Downloads

21

Shares

0

Comments

0

Likes

0

×