Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
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
Nächste SlideShare
Wird geladen in …5
×

Jsp elements

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

Ähnliche Bücher

Kostenlos mit einer 30-tägigen Testversion von Scribd

Alle anzeigen

Ähnliche Hörbücher

Kostenlos mit einer 30-tägigen Testversion von Scribd

Alle anzeigen
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

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

×