SlideShare une entreprise Scribd logo
1  sur  2
Télécharger pour lire hors ligne
scriptlet
                                                            Directives                                             Contains a block of scripting code. A JSP page can
                                                                                                                   contain multiple blocks of scripting code.
                                                           page                                                    <% script code %>

                                                           Defines page-wide attributes.                           Example:
                                                           <%@ page attribute="value" ... %>                       <%   String greeting =
                                                                                                                            request.getParameter("Greeting");
                                                           attributes, with default values, are:                        out.println(greeting); %>

JSP Quick Reference Card                                   attribute = language="java" | session="true"
                                                           | contentType=text/html;charset="ISO-8859-1"            expression
                                                           | import="package(s)" | buffer="8kb"
 Basic Syntax                                              | autoflush="true" | isThreadSafe="true"                Defines statements evaluated on the server before
                                                           | info="text_string" | errorPage="relativeURL"          sending the page output to the client.
                                                           | isErrorpage="true" | extends="class_name"
                                                                                                                   <%= expression %>
Default scripting language                                 value = a string literal in single or double quotes.
                                                                                                                   Example:
The scripting language of a JSP page defaults to Java.
Insert the following line in a JSP page to configure the
                                                           include                                                 <%= myVar1%>

page to use JavaScript:                                    Inserts text into a JSP page.
<%@   page language = "javascript" %>
                                                           <%@ include file = "path" ... %>                         Actions
Using white space                                          taglib                                                  jsp:include
White space contained within the template code is          Defines a custom tag library used by a JSP page.        Call one JSP page from another. Upon completion, the
returned to the client as it was entered in the JSP.
                                                           <%@ taglib uri="tagLibraryURI"                          destination page returns control to the calling page.
                                                               prefix="tagPrefix" %>
Quoting attribute values                                                                                           <jsp:include page="path" flush="true"/>
                                                           After the taglib directive, reference the custom tags
Quote attribute values, using either single or double      using the syntax:                                       <jsp:include page="path" flush="true">
quotes, to all JSP elements. For example:                                                                              <jsp:param name="paramName"
                                                           <tagPrefix:tagName>                                         value="paramValue" /> ...
<%@   page contentType = "text/plain" %>                   ...                                                     </jsp:include>
                                                           </tagPrefix:tagName>
Writing comments for the JSP                                                                                       jsp:forward
A JSP comment is not output to the client as part of the
                                                            Scripting Elements                                     Calls one JSP page from another. Execution of the calling
JSP page’s output.                                                                                                 page is terminated by the call.
<%-- Comment string... --%>                                declaration                                             <jsp:forward page="path" />
                                                           Creates page-wide definitions such as variables.
Outputting comments to the client                                                                                  <jsp:forward page="path">
                                                           <%! declaration %>                                          <jsp:param name="paramName"
HTML comments are output to the client.                                                                                value="paramValue" /> ...
                                                           Example:                                                </jsp:forward>
<!-- comments -->
                                                           <%! private String foo = null;
                                                               public String getFoo() {return this.foo;} %>
jsp:plugin                                             jsp:setProperty                                              pageContext
Enables you to invoke an applet on a client browser.   Sets the value of one or more properties in a bean.          The page context for the JSP.
<jsp:plugin                                            <jsp:setProperty name="beanName" prop_expr />                Java type: javax.servlet.jsp.PageContext
    type="bean|applet"
                                                       prop_expr has one of the following forms:
    code="objectCode"                                                                                               request
    codebase="objectCodebase"                          property="*" |
    { align="alignment" }                              property="propertyName"|                                     The client request.
    { archive="archiveList" }                          property="propertyName" param="parameterName"|
    { height="height" }                                property="propertyName" value="propertyValue"                Java type: javax.servlet.HttpServletRequest
    { hspace="hspace" }
    { jreversion="jreversion" }                        jsp:getProperty                                              response
    { name="componentName" }
    { vspace="vspace" }                                Writes the value of a bean property as a string to the out   The response to the client.
    { width="width" }
                                                       object.                                                      Java type: javax.servlet.HttpServletResponse
    { nspluginurl="url" }
    { iepluginurl="url" } >                            <jsp:getProperty name="name"
    { <jsp:params>                                         property="propertyName" />                               session
        { <jsp:param name=" paramName"
            value="paramValue" /> }+                                                                                The session object created for the requesting client.
    </jsp:params> }                                     JSP Objects
    { <jsp:fallback> arbitrary_text                                                                                 Java type: javax.servlet.http.HttpSession
    </jsp:fallback> } >                                See the corresponding Java object type for the available
</jsp:plugin>                                          methods for these objects.
                                                                                                                     Allaire Contact Information
The elements in brackets ({}) are optional.
                                                       application
jsp:useBean                                                                                                         Allaire Web sites
                                                       The servlet context obtained from the servlet
Defines an instance of a Java bean.                    configuration object.                                        Main Allaire Web site:
                                                       Java type: javax.servlet.ServletContext                      www.allaire.com
<jsp:useBean id="name"
    scope="page|request|session|application"                                                                        JRun Development Center:
    typeSpec />                                        config
                                                                                                                    www.allaire.com/developer/jrunreferencedesk/
<jsp:useBean id="name"                                 The ServletConfig object for the JSP page.                   JRun Developer Forum:
    scope="page|request|session|application"
    typeSpec >
                                                       Java type: javax.servlet.ServletConfig                       forums.allaire.com/jrunconf
    body
</jsp:useBean>                                         exception                                                    Allaire technical support
typespec is any one of the following:                  The uncaught exception that resulted in the error page       Telephone support is available Monday through from
class="className" |                                    being invoked.                                               Friday 8 AM to 8 PM Eastern time (except holidays).
class="className" type="typeName" |
                                                       Java type: java.lang.Throwable                               Toll Free: 888.939.2545 (U.S. and Canada)
beanName="beanName" type=" typeName" |
type="typeName"                                                                                                     Telephone: 617.761.2100 (outside U.S. and Canada)
                                                       out
                                                                                                                    JRun is a trademark of Allaire Corporation. All other trademarks are
                                                       An object that writes into a JSP page’s output stream.       property of their respective holder(s.)
                                                                                                                    © 2000 Allaire Corporation. All rights reserved.
                                                       Java type: javax.servlet.jsp.JspWriter                       Part number: AA-JRQRF-RK

Contenu connexe

Tendances

Java Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsJava Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsIMC Institute
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXIMC Institute
 
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 BasicIMC Institute
 
Implicit objects advance Java
Implicit objects advance JavaImplicit objects advance Java
Implicit objects advance JavaDarshit Metaliya
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7phuphax
 
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on RailsContent-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on Railsbkraft
 
Java Web Programming [7/9] : Struts2 Basics
Java Web Programming [7/9] : Struts2 BasicsJava Web Programming [7/9] : Struts2 Basics
Java Web Programming [7/9] : Struts2 BasicsIMC Institute
 
Java Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCJava Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCIMC Institute
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questionsSujata Regoti
 

Tendances (20)

Java Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsJava Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom Tags
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
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
 
Implicit objects advance Java
Implicit objects advance JavaImplicit objects advance Java
Implicit objects advance Java
 
Jsp
JspJsp
Jsp
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentation
 
Jsp slides
Jsp slidesJsp slides
Jsp slides
 
Jsp Slides
Jsp SlidesJsp Slides
Jsp Slides
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
WEB TECHNOLOGIES JSP
 
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on RailsContent-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
 
Jsp
JspJsp
Jsp
 
Jsp
JspJsp
Jsp
 
Sightly - Part 2
Sightly - Part 2Sightly - Part 2
Sightly - Part 2
 
Implicit object.pptx
Implicit object.pptxImplicit object.pptx
Implicit object.pptx
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Java Web Programming [7/9] : Struts2 Basics
Java Web Programming [7/9] : Struts2 BasicsJava Web Programming [7/9] : Struts2 Basics
Java Web Programming [7/9] : Struts2 Basics
 
Java Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCJava Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVC
 
Java server pages
Java server pagesJava server pages
Java server pages
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questions
 

En vedette

Nature & Background of Electricity
Nature & Background of ElectricityNature & Background of Electricity
Nature & Background of ElectricityLuisa Oblena
 
Electricity saving in Buildings using LEDs Lightbulbs
Electricity saving in Buildings using LEDs LightbulbsElectricity saving in Buildings using LEDs Lightbulbs
Electricity saving in Buildings using LEDs LightbulbsAkhtar Zeb
 
K to 12 - Grade 8 Science Learner Module
K to 12 - Grade 8 Science Learner ModuleK to 12 - Grade 8 Science Learner Module
K to 12 - Grade 8 Science Learner ModuleNico Granada
 

En vedette (6)

Weston Electricity
Weston ElectricityWeston Electricity
Weston Electricity
 
Jesses Electricity
Jesses ElectricityJesses Electricity
Jesses Electricity
 
Nature & Background of Electricity
Nature & Background of ElectricityNature & Background of Electricity
Nature & Background of Electricity
 
Electricity saving in Buildings using LEDs Lightbulbs
Electricity saving in Buildings using LEDs LightbulbsElectricity saving in Buildings using LEDs Lightbulbs
Electricity saving in Buildings using LEDs Lightbulbs
 
Electricity
ElectricityElectricity
Electricity
 
K to 12 - Grade 8 Science Learner Module
K to 12 - Grade 8 Science Learner ModuleK to 12 - Grade 8 Science Learner Module
K to 12 - Grade 8 Science Learner Module
 

Similaire à Jsp quick reference card

JSP Syntax_1
JSP Syntax_1JSP Syntax_1
JSP Syntax_1brecke
 
JSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODSJSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODSbharathiv53
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSPGeethu Mohan
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server PagesRami Nayan
 
JSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESJSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESYoga Raja
 
Session 5 : intro to jsp - Giáo trình Bách Khoa Aptech
Session 5 : intro to jsp  - Giáo trình Bách Khoa AptechSession 5 : intro to jsp  - Giáo trình Bách Khoa Aptech
Session 5 : intro to jsp - Giáo trình Bách Khoa AptechMasterCode.vn
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server PageVipin Yadav
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7phuphax
 
Jsp 02(jsp directives)2003
Jsp 02(jsp directives)2003Jsp 02(jsp directives)2003
Jsp 02(jsp directives)2003Subhasis Nayak
 
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4:  JavaServer Pages (JSP) & Expression Language (EL)Lecture 4:  JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)Fahad Golra
 

Similaire à Jsp quick reference card (20)

JSP Syntax_1
JSP Syntax_1JSP Syntax_1
JSP Syntax_1
 
JSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODSJSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODS
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSP
 
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 element
Jsp elementJsp element
Jsp element
 
JSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESJSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGES
 
Session 5 : intro to jsp - Giáo trình Bách Khoa Aptech
Session 5 : intro to jsp  - Giáo trình Bách Khoa AptechSession 5 : intro to jsp  - Giáo trình Bách Khoa Aptech
Session 5 : intro to jsp - Giáo trình Bách Khoa Aptech
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server Page
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7
 
Jsp in Servlet by Rj
Jsp in Servlet by RjJsp in Servlet by Rj
Jsp in Servlet by Rj
 
Jsp 02(jsp directives)2003
Jsp 02(jsp directives)2003Jsp 02(jsp directives)2003
Jsp 02(jsp directives)2003
 
Chap4 4 2
Chap4 4 2Chap4 4 2
Chap4 4 2
 
Card12
Card12Card12
Card12
 
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4:  JavaServer Pages (JSP) & Expression Language (EL)Lecture 4:  JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
 
4. jsp
4. jsp4. jsp
4. jsp
 
Java ppt
Java pptJava ppt
Java ppt
 
JSP
JSPJSP
JSP
 
JSP.pptx
JSP.pptxJSP.pptx
JSP.pptx
 
Jsp
JspJsp
Jsp
 

Plus de JavaEE Trainers

Introduction tomcat7 servlet3
Introduction tomcat7 servlet3Introduction tomcat7 servlet3
Introduction tomcat7 servlet3JavaEE Trainers
 
Introduction to java servlet 3.0 api javaone 2009
Introduction to java servlet 3.0 api javaone 2009Introduction to java servlet 3.0 api javaone 2009
Introduction to java servlet 3.0 api javaone 2009JavaEE Trainers
 
Introduction to java servlet 3.0 api javaone 2008
Introduction to java servlet 3.0 api javaone 2008Introduction to java servlet 3.0 api javaone 2008
Introduction to java servlet 3.0 api javaone 2008JavaEE Trainers
 
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)JavaEE Trainers
 
Servlet/JSP course chapter 1: Introduction to servlets
Servlet/JSP course chapter 1: Introduction to servletsServlet/JSP course chapter 1: Introduction to servlets
Servlet/JSP course chapter 1: Introduction to servletsJavaEE Trainers
 
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
 
jsp, javaserver pages, Card20
jsp, javaserver pages, Card20jsp, javaserver pages, Card20
jsp, javaserver pages, Card20JavaEE Trainers
 
Struts2 course chapter 2: installation and configuration
Struts2 course chapter 2: installation and configurationStruts2 course chapter 2: installation and configuration
Struts2 course chapter 2: installation and configurationJavaEE Trainers
 
Struts2 course chapter 1: Evolution of Web Applications
Struts2 course chapter 1: Evolution of Web ApplicationsStruts2 course chapter 1: Evolution of Web Applications
Struts2 course chapter 1: Evolution of Web ApplicationsJavaEE Trainers
 
Struts2 Course: Introduction
Struts2 Course: IntroductionStruts2 Course: Introduction
Struts2 Course: IntroductionJavaEE Trainers
 

Plus de JavaEE Trainers (10)

Introduction tomcat7 servlet3
Introduction tomcat7 servlet3Introduction tomcat7 servlet3
Introduction tomcat7 servlet3
 
Introduction to java servlet 3.0 api javaone 2009
Introduction to java servlet 3.0 api javaone 2009Introduction to java servlet 3.0 api javaone 2009
Introduction to java servlet 3.0 api javaone 2009
 
Introduction to java servlet 3.0 api javaone 2008
Introduction to java servlet 3.0 api javaone 2008Introduction to java servlet 3.0 api javaone 2008
Introduction to java servlet 3.0 api javaone 2008
 
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
Servlet/JSP course chapter 2: Introduction to JavaServer Pages (JSP)
 
Servlet/JSP course chapter 1: Introduction to servlets
Servlet/JSP course chapter 1: Introduction to servletsServlet/JSP course chapter 1: Introduction to servlets
Servlet/JSP course chapter 1: Introduction to servlets
 
Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course Introduction to the Servlet / JSP course
Introduction to the Servlet / JSP course
 
jsp, javaserver pages, Card20
jsp, javaserver pages, Card20jsp, javaserver pages, Card20
jsp, javaserver pages, Card20
 
Struts2 course chapter 2: installation and configuration
Struts2 course chapter 2: installation and configurationStruts2 course chapter 2: installation and configuration
Struts2 course chapter 2: installation and configuration
 
Struts2 course chapter 1: Evolution of Web Applications
Struts2 course chapter 1: Evolution of Web ApplicationsStruts2 course chapter 1: Evolution of Web Applications
Struts2 course chapter 1: Evolution of Web Applications
 
Struts2 Course: Introduction
Struts2 Course: IntroductionStruts2 Course: Introduction
Struts2 Course: Introduction
 

Dernier

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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
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
 
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
 

Dernier (20)

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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
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
 
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
 

Jsp quick reference card

  • 1. scriptlet Directives Contains a block of scripting code. A JSP page can contain multiple blocks of scripting code. page <% script code %> Defines page-wide attributes. Example: <%@ page attribute="value" ... %> <% String greeting = request.getParameter("Greeting"); attributes, with default values, are: out.println(greeting); %> JSP Quick Reference Card attribute = language="java" | session="true" | contentType=text/html;charset="ISO-8859-1" expression | import="package(s)" | buffer="8kb" Basic Syntax | autoflush="true" | isThreadSafe="true" Defines statements evaluated on the server before | info="text_string" | errorPage="relativeURL" sending the page output to the client. | isErrorpage="true" | extends="class_name" <%= expression %> Default scripting language value = a string literal in single or double quotes. Example: The scripting language of a JSP page defaults to Java. Insert the following line in a JSP page to configure the include <%= myVar1%> page to use JavaScript: Inserts text into a JSP page. <%@ page language = "javascript" %> <%@ include file = "path" ... %> Actions Using white space taglib jsp:include White space contained within the template code is Defines a custom tag library used by a JSP page. Call one JSP page from another. Upon completion, the returned to the client as it was entered in the JSP. <%@ taglib uri="tagLibraryURI" destination page returns control to the calling page. prefix="tagPrefix" %> Quoting attribute values <jsp:include page="path" flush="true"/> After the taglib directive, reference the custom tags Quote attribute values, using either single or double using the syntax: <jsp:include page="path" flush="true"> quotes, to all JSP elements. For example: <jsp:param name="paramName" <tagPrefix:tagName> value="paramValue" /> ... <%@ page contentType = "text/plain" %> ... </jsp:include> </tagPrefix:tagName> Writing comments for the JSP jsp:forward A JSP comment is not output to the client as part of the Scripting Elements Calls one JSP page from another. Execution of the calling JSP page’s output. page is terminated by the call. <%-- Comment string... --%> declaration <jsp:forward page="path" /> Creates page-wide definitions such as variables. Outputting comments to the client <jsp:forward page="path"> <%! declaration %> <jsp:param name="paramName" HTML comments are output to the client. value="paramValue" /> ... Example: </jsp:forward> <!-- comments --> <%! private String foo = null; public String getFoo() {return this.foo;} %>
  • 2. jsp:plugin jsp:setProperty pageContext Enables you to invoke an applet on a client browser. Sets the value of one or more properties in a bean. The page context for the JSP. <jsp:plugin <jsp:setProperty name="beanName" prop_expr /> Java type: javax.servlet.jsp.PageContext type="bean|applet" prop_expr has one of the following forms: code="objectCode" request codebase="objectCodebase" property="*" | { align="alignment" } property="propertyName"| The client request. { archive="archiveList" } property="propertyName" param="parameterName"| { height="height" } property="propertyName" value="propertyValue" Java type: javax.servlet.HttpServletRequest { hspace="hspace" } { jreversion="jreversion" } jsp:getProperty response { name="componentName" } { vspace="vspace" } Writes the value of a bean property as a string to the out The response to the client. { width="width" } object. Java type: javax.servlet.HttpServletResponse { nspluginurl="url" } { iepluginurl="url" } > <jsp:getProperty name="name" { <jsp:params> property="propertyName" /> session { <jsp:param name=" paramName" value="paramValue" /> }+ The session object created for the requesting client. </jsp:params> } JSP Objects { <jsp:fallback> arbitrary_text Java type: javax.servlet.http.HttpSession </jsp:fallback> } > See the corresponding Java object type for the available </jsp:plugin> methods for these objects. Allaire Contact Information The elements in brackets ({}) are optional. application jsp:useBean Allaire Web sites The servlet context obtained from the servlet Defines an instance of a Java bean. configuration object. Main Allaire Web site: Java type: javax.servlet.ServletContext www.allaire.com <jsp:useBean id="name" scope="page|request|session|application" JRun Development Center: typeSpec /> config www.allaire.com/developer/jrunreferencedesk/ <jsp:useBean id="name" The ServletConfig object for the JSP page. JRun Developer Forum: scope="page|request|session|application" typeSpec > Java type: javax.servlet.ServletConfig forums.allaire.com/jrunconf body </jsp:useBean> exception Allaire technical support typespec is any one of the following: The uncaught exception that resulted in the error page Telephone support is available Monday through from class="className" | being invoked. Friday 8 AM to 8 PM Eastern time (except holidays). class="className" type="typeName" | Java type: java.lang.Throwable Toll Free: 888.939.2545 (U.S. and Canada) beanName="beanName" type=" typeName" | type="typeName" Telephone: 617.761.2100 (outside U.S. and Canada) out JRun is a trademark of Allaire Corporation. All other trademarks are An object that writes into a JSP page’s output stream. property of their respective holder(s.) © 2000 Allaire Corporation. All rights reserved. Java type: javax.servlet.jsp.JspWriter Part number: AA-JRQRF-RK