SlideShare ist ein Scribd-Unternehmen logo
1 von 24
WHAT IS JSP???
    JSP is a java based technology used to simplify the development of
dynamic web pages. JSP is used to separate dynamic content of web page
from its content with the help of HTML and JSP tags. Current version is 2.1.
WHAT THE WEB ARCHITECTURE OF JSP?
JSP MODEL I ARCHITECTURE
JSP MODEL II ARCHITECTURE
HOW MANY STAGES IN JSP LIFE CYCLE
FIVE STAGES OF JSP LIFE CYCLE

1. Page Translation stage
2. Page compilation stage
3. Loading & initialization stage
4. Request handling stage
5. Destroying stage
JSP LIFE CYCLE AS……….
WHAT ARE JSP ELEMENTS AN
THEIR TYPES????
WHAT ARE JSP ELEMENTS?????
JSP page consist of elements and templates data .These elements are described in different elements type are: -
Directives:- JSP directives provides the page resources and their properties. Some are as:-
1. Page directive :-Used to provide page specific properties
Eg:<%@page contentType=”text/html” language=”java” %>
Attributes are:-
1.   Autoflush=”true/false”
2.   Buffer=”in KB”
3.   contentType=”info”
4.   errorPage=”page url”
5.   extends=”classname”
6.   import=”package separated by comma”
7.   info=”infotext”
8.   isELIgnored=”true/false”
9.   isErrorPage=”pagenameurl”
10. isThreadSafe=”true/false”
11. language=”java”
12. pageEncoding=”ISO-8859-1”
13. session=”true/false”
WHAT ARE JSP ELEMENTS?????

2. Include Directives:-
The include directives tells the container to add the defined resource content inline to the JSP page
during the translation time .This tag used to make reusability.
Eg :-
<%@ include file=”header.html” %>

3. Taglib Directives:-
Taglib tag is used to include external tag library in your web page.


Attributes are:-
1.Uri=”url of taglibrary”
2.tagDir=”tag library directory”
3.prefix=”like object for library”
HOW MANY SCRIPTING ELEMENTS USED IN
JSP?????



•   1. <%! This is a declaration %>
•   2. <% this is a scriptlet %>
•   3. <% = this is an expression %>
NOW I AM DESCRIBING ACTION ELEMENTS IN
JSP ?????????
DESCRIBING ACTION ELEMENTS IN JSP
            ?????????


 Action elements are certain directives that are given
   to the container perform certain task during the
              execution of a JSP page.
DESCRIBING ACTION ELEMENTS IN JSP ?????????

1. <JSP:useBean>:-
The useBean tag is used to create instance for specified java bean for JSP
page.
Attributes of this tag:-
Id => what the object name you want to specifiy for this bean.
Scope => whats the scope of bean object page,request,session or
application.
Class => case sensitive name of bean class
beanName => a valid bean name no include the bean classname
type => optional attribute java class has been defined.
DESCRIBING ACTION ELEMENTS IN JSP ?????????

• 1. <JSP:getProperty> :-
• this action used to access the defines property to bean object.But it is
  important to declare bean object using useBean tag.
• Attributes are:-
• 1. name :- The name of object where to retrieve object properties.
• 2. property: - Name of property to get.
• Eg:-
• <jsp:getProperty name=”beanname”property=”propertyname”>
DESCRIBING ACTION ELEMENTS IN JSP ?????????

• 1. <JSP:getProperty> :-
this action used to access the defines property to bean object.But it
is important to declare bean object using useBean tag.
Attributes are:-
1. name :- The name of object where to retrieve object properties.
2. property: - Name of property to get.
Eg:-
<jsp:getProperty
name=”beanname”property=”propertyname”>
DESCRIBING ACTION ELEMENTS IN JSP ?????????

. <JSP:setProperty> :-
This action element is used to set the property of bean object specified by usebean tag.
Attributes are:-
1.Name :- name of bean which have to specify value
2.Property:-
name of property value to be set we can also use * to specify all the property of bean.but in this
case you have to specify the name of components as bean property.
3.Param:- The name of the request parameter whose value you want to give to a bean
property.this name basically come from web form.
4.Value:- the value to be assign to this property.
Eg:-
<jsp:setProperty name=”beanname” property=”propertyname” value=”tobeset” >
=”propertyname”>
NOW UNDERSTAND THIS USING EXAMPLE


 We are creating a login screen with java bean which
  check the username and password and return the
               result according to input
INDEX.JSP
<%--
   DOCUMENT : INDEX
   CREATED ON : APR 2, 2012, 12:23:12 PM
   AUTHOR : BARDHAN
--%>

<%@PAGE CONTENTTYPE="TEXT/HTML" PAGEENCODING="UTF-8"%>
<!DOCTYPE HTML>
<HTML>
  <HEAD>
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=UTF-8">
    <TITLE>JSP PAGE</TITLE>
  </HEAD>
  <BODY>
    <FORM ACTION="CHECK.JSP" METHOD="POST">
      ENTER NAME <INPUT TYPE="TEXT" NAME="NAME" /><BR>
      ENTER PASSWORD <INPUT TYPE="PASSWORD" NAME="PASSWORD" />
      <BR/>
      <INPUT TYPE="SUBMIT" VALUE="LOGIN" />
      <INPUT TYPE="RESET" VALUE="RESET" />
    </FORM>
  </BODY>
</HTML>
CHECK.JSP PAGE:-
<%--
   DOCUMENT : CHECK
   CREATED ON : APR 2, 2012, 12:29:55 PM
   AUTHOR : BARDHAN
--%>

<%@PAGE CONTENTTYPE="TEXT/HTML" PAGEENCODING="UTF-8"%>
<!DOCTYPE HTML>
<HTML>
  <HEAD>
     <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=UTF-8">
     <TITLE>JSP PAGE</TITLE>
  </HEAD>
  <BODY>
     <JSP:USEBEAN ID="LOGIN" CLASS="BEANS.LOGIN" SCOPE="PAGE">
        <JSP:SETPROPERTY NAME="LOGIN" PROPERTY="*" />
     </JSP:USEBEAN>
     YOUR NAME:<JSP:GETPROPERTY NAME="LOGIN" PROPERTY="NAME" />
     <BR>
     YOUR PASSWORD IS:<JSP:GETPROPERTY NAME="LOGIN" PROPERTY="PASSWORD" />
    <%BOOLEAN BA=LOGIN.GETRESULT();
    IF(BA)
             {
      RESPONSE.SENDREDIRECT("WELCOME.JSP");
    }
         ELSE{
       OUT.PRINTLN("THIS IS NOT RIGHT USERNAME OR PASSWORD");
         }

%>
  </BODY>
</HTML>
•
•   Bean.login bean:-                                 public void setName(String name) {
    /*                                                  this.name = name;
     * To change this template, choose                }
    Tools | Templates                                 public String getPassword() {
     * and open the template in the editor.             return password;
     */                                               }
    package beans;
                                                    public void setPassword(String
                                                  password) {
    /**                                               this.password = password;
     *                                              }
     * @author BARDHAN                              public boolean getResult()
                                                    {
     */
    public class login                            if(this.name.equals("sanju")&&password.eq
    {                                             uals("123"))
       private String name;                              {
                                                           result=true;
       private String password;
       private boolean result;                            }
                                                          else
                                                          {
      public String getName() {                            result=false;
        return name;                                      }
      }                                                   return result;
                                                      }
                                                  }
DESCRIBING ACTION ELEMENTS IN JSP ?????????

4. .<JSP:param>:-
This action element is used to pass the parameter to other action
elements. For example
<jsp:forward page=”hello.jsp”>
<jsp:param name=”id” value=”12” />
</jsp:forward>
DESCRIBING ACTION ELEMENTS IN JSP ?????????

•   5.<jsp:include> :-
•   This action element is used to include any jsp file in your web page.
•   <jsp:include page=”header.jsp” flush=”true|false” />
•   6.<jsp:forward> :-
•   Used to forward request control to next page .For example
•   <jsp:forward page=”next.jsp” ></jsp:forward>
•
•   7.<jsp:expression>:- work like expression script
•   8.<jsp:scriptlet> :- work like as script element
•   9.<jsp:declaration> :-work as declaration element
DESCRIBING THE JSP IMPLICIT
OBJECTS…………………….

JSP Implicit objects are described as follows
1. Application :- Used as Servlet Context object in servlets
2. Config:- Used as ServletConfig object in servlets
3. Out :- JSPWriter object to print any thing on jsp page
4. Page:- work like as Object class object
5. pageContext:- PageConext for JSP page
6. request: work like as ServletRequest object
7. response:- work like as ServletResponse Object in Servlets
8. session :- like as httpSession.

Weitere ähnliche Inhalte

Was ist angesagt?

anatomy of a jsp page & jsp syntax.pptx
anatomy of a jsp page & jsp syntax.pptxanatomy of a jsp page & jsp syntax.pptx
anatomy of a jsp page & jsp syntax.pptxSameenafathima4
 
Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentationalaa.moustafa
 
Java And Multithreading
Java And MultithreadingJava And Multithreading
Java And MultithreadingShraddha
 
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Edureka!
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot IntroductionJeevesh Pandey
 
Jsp lifecycle
Jsp   lifecycleJsp   lifecycle
Jsp lifecyclechauhankapil
 
Servlet and servlet life cycle
Servlet and servlet life cycleServlet and servlet life cycle
Servlet and servlet life cycleDhruvin Nakrani
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server PageVipin Yadav
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)slire
 
jstl ( jsp standard tag library )
jstl ( jsp standard tag library )jstl ( jsp standard tag library )
jstl ( jsp standard tag library )Adarsh Patel
 
Java servlets
Java servletsJava servlets
Java servletslopjuan
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Gunith Devasurendra
 
Core java concepts
Core java  conceptsCore java  concepts
Core java conceptsRam132
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 

Was ist angesagt? (20)

anatomy of a jsp page & jsp syntax.pptx
anatomy of a jsp page & jsp syntax.pptxanatomy of a jsp page & jsp syntax.pptx
anatomy of a jsp page & jsp syntax.pptx
 
Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentation
 
Java And Multithreading
Java And MultithreadingJava And Multithreading
Java And Multithreading
 
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Jsp lifecycle
Jsp   lifecycleJsp   lifecycle
Jsp lifecycle
 
Servlet and servlet life cycle
Servlet and servlet life cycleServlet and servlet life cycle
Servlet and servlet life cycle
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server Page
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Java swing
Java swingJava swing
Java swing
 
jstl ( jsp standard tag library )
jstl ( jsp standard tag library )jstl ( jsp standard tag library )
jstl ( jsp standard tag library )
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Threads concept in java
Threads concept in javaThreads concept in java
Threads concept in java
 
Java servlets
Java servletsJava servlets
Java servlets
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Java Collections
Java  Collections Java  Collections
Java Collections
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
JDBC
JDBCJDBC
JDBC
 
Database Access With JDBC
Database Access With JDBCDatabase Access With JDBC
Database Access With JDBC
 

Ähnlich wie Jsp presentation

java beans
java beansjava beans
java beanslapa
 
Struts database access
Struts database accessStruts database access
Struts database accessAbass Ndiaye
 
13 java beans
13 java beans13 java beans
13 java beanssnopteck
 
Introduction to hibernate
Introduction to hibernateIntroduction to hibernate
Introduction to hibernateMuhammad Zeeshan
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-entechbed
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ EtsyNishan Subedi
 
Link.javaLink.javapackage com.bookstore.domain.model;import .docx
Link.javaLink.javapackage com.bookstore.domain.model;import .docxLink.javaLink.javapackage com.bookstore.domain.model;import .docx
Link.javaLink.javapackage com.bookstore.domain.model;import .docxSHIVA101531
 
Maze
MazeMaze
Mazeyito24
 
Codemotion appengine
Codemotion appengineCodemotion appengine
Codemotion appengineIgnacio Coloma
 
Create an advance data type to represent web page history. Name this .pdf
Create an advance data type to represent web page history. Name this .pdfCreate an advance data type to represent web page history. Name this .pdf
Create an advance data type to represent web page history. Name this .pdfsanuoptical
 
Zend Framework and the Doctrine2 MongoDB ODM (ZF1)
Zend Framework and the Doctrine2 MongoDB ODM (ZF1)Zend Framework and the Doctrine2 MongoDB ODM (ZF1)
Zend Framework and the Doctrine2 MongoDB ODM (ZF1)Ryan Mauger
 
JSP Part 2
JSP Part 2JSP Part 2
JSP Part 2DeeptiJava
 
Ajax Tags Advanced
Ajax Tags AdvancedAjax Tags Advanced
Ajax Tags AdvancedAkramWaseem
 
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Fabien Potencier
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScriptDonald Sipe
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7phuphax
 

Ähnlich wie Jsp presentation (20)

java beans
java beansjava beans
java beans
 
Struts database access
Struts database accessStruts database access
Struts database access
 
13 java beans
13 java beans13 java beans
13 java beans
 
Java beans
Java beansJava beans
Java beans
 
Using java beans(ii)
Using java beans(ii)Using java beans(ii)
Using java beans(ii)
 
Introduction to hibernate
Introduction to hibernateIntroduction to hibernate
Introduction to hibernate
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-en
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
 
Link.javaLink.javapackage com.bookstore.domain.model;import .docx
Link.javaLink.javapackage com.bookstore.domain.model;import .docxLink.javaLink.javapackage com.bookstore.domain.model;import .docx
Link.javaLink.javapackage com.bookstore.domain.model;import .docx
 
Java Script Best Practices
Java Script Best PracticesJava Script Best Practices
Java Script Best Practices
 
Maze
MazeMaze
Maze
 
Codemotion appengine
Codemotion appengineCodemotion appengine
Codemotion appengine
 
Create an advance data type to represent web page history. Name this .pdf
Create an advance data type to represent web page history. Name this .pdfCreate an advance data type to represent web page history. Name this .pdf
Create an advance data type to represent web page history. Name this .pdf
 
Zend Framework and the Doctrine2 MongoDB ODM (ZF1)
Zend Framework and the Doctrine2 MongoDB ODM (ZF1)Zend Framework and the Doctrine2 MongoDB ODM (ZF1)
Zend Framework and the Doctrine2 MongoDB ODM (ZF1)
 
JSP Part 2
JSP Part 2JSP Part 2
JSP Part 2
 
Ajax Tags Advanced
Ajax Tags AdvancedAjax Tags Advanced
Ajax Tags Advanced
 
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7
 

KĂźrzlich hochgeladen

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

KĂźrzlich hochgeladen (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Jsp presentation

  • 1. WHAT IS JSP??? JSP is a java based technology used to simplify the development of dynamic web pages. JSP is used to separate dynamic content of web page from its content with the help of HTML and JSP tags. Current version is 2.1.
  • 2. WHAT THE WEB ARCHITECTURE OF JSP?
  • 3. JSP MODEL I ARCHITECTURE
  • 4. JSP MODEL II ARCHITECTURE
  • 5. HOW MANY STAGES IN JSP LIFE CYCLE
  • 6. FIVE STAGES OF JSP LIFE CYCLE 1. Page Translation stage 2. Page compilation stage 3. Loading & initialization stage 4. Request handling stage 5. Destroying stage
  • 7. JSP LIFE CYCLE AS……….
  • 8. WHAT ARE JSP ELEMENTS AN THEIR TYPES????
  • 9. WHAT ARE JSP ELEMENTS????? JSP page consist of elements and templates data .These elements are described in different elements type are: - Directives:- JSP directives provides the page resources and their properties. Some are as:- 1. Page directive :-Used to provide page specific properties Eg:<%@page contentType=”text/html” language=”java” %> Attributes are:- 1. Autoflush=”true/false” 2. Buffer=”in KB” 3. contentType=”info” 4. errorPage=”page url” 5. extends=”classname” 6. import=”package separated by comma” 7. info=”infotext” 8. isELIgnored=”true/false” 9. isErrorPage=”pagenameurl” 10. isThreadSafe=”true/false” 11. language=”java” 12. pageEncoding=”ISO-8859-1” 13. session=”true/false”
  • 10. WHAT ARE JSP ELEMENTS????? 2. Include Directives:- The include directives tells the container to add the defined resource content inline to the JSP page during the translation time .This tag used to make reusability. Eg :- <%@ include file=”header.html” %> 3. Taglib Directives:- Taglib tag is used to include external tag library in your web page. Attributes are:- 1.Uri=”url of taglibrary” 2.tagDir=”tag library directory” 3.prefix=”like object for library”
  • 11. HOW MANY SCRIPTING ELEMENTS USED IN JSP????? • 1. <%! This is a declaration %> • 2. <% this is a scriptlet %> • 3. <% = this is an expression %>
  • 12. NOW I AM DESCRIBING ACTION ELEMENTS IN JSP ?????????
  • 13. DESCRIBING ACTION ELEMENTS IN JSP ????????? Action elements are certain directives that are given to the container perform certain task during the execution of a JSP page.
  • 14. DESCRIBING ACTION ELEMENTS IN JSP ????????? 1. <JSP:useBean>:- The useBean tag is used to create instance for specified java bean for JSP page. Attributes of this tag:- Id => what the object name you want to specifiy for this bean. Scope => whats the scope of bean object page,request,session or application. Class => case sensitive name of bean class beanName => a valid bean name no include the bean classname type => optional attribute java class has been defined.
  • 15. DESCRIBING ACTION ELEMENTS IN JSP ????????? • 1. <JSP:getProperty> :- • this action used to access the defines property to bean object.But it is important to declare bean object using useBean tag. • Attributes are:- • 1. name :- The name of object where to retrieve object properties. • 2. property: - Name of property to get. • Eg:- • <jsp:getProperty name=”beanname”property=”propertyname”>
  • 16. DESCRIBING ACTION ELEMENTS IN JSP ????????? • 1. <JSP:getProperty> :- this action used to access the defines property to bean object.But it is important to declare bean object using useBean tag. Attributes are:- 1. name :- The name of object where to retrieve object properties. 2. property: - Name of property to get. Eg:- <jsp:getProperty name=”beanname”property=”propertyname”>
  • 17. DESCRIBING ACTION ELEMENTS IN JSP ????????? . <JSP:setProperty> :- This action element is used to set the property of bean object specified by usebean tag. Attributes are:- 1.Name :- name of bean which have to specify value 2.Property:- name of property value to be set we can also use * to specify all the property of bean.but in this case you have to specify the name of components as bean property. 3.Param:- The name of the request parameter whose value you want to give to a bean property.this name basically come from web form. 4.Value:- the value to be assign to this property. Eg:- <jsp:setProperty name=”beanname” property=”propertyname” value=”tobeset” > =”propertyname”>
  • 18. NOW UNDERSTAND THIS USING EXAMPLE We are creating a login screen with java bean which check the username and password and return the result according to input
  • 19. INDEX.JSP <%-- DOCUMENT : INDEX CREATED ON : APR 2, 2012, 12:23:12 PM AUTHOR : BARDHAN --%> <%@PAGE CONTENTTYPE="TEXT/HTML" PAGEENCODING="UTF-8"%> <!DOCTYPE HTML> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=UTF-8"> <TITLE>JSP PAGE</TITLE> </HEAD> <BODY> <FORM ACTION="CHECK.JSP" METHOD="POST"> ENTER NAME <INPUT TYPE="TEXT" NAME="NAME" /><BR> ENTER PASSWORD <INPUT TYPE="PASSWORD" NAME="PASSWORD" /> <BR/> <INPUT TYPE="SUBMIT" VALUE="LOGIN" /> <INPUT TYPE="RESET" VALUE="RESET" /> </FORM> </BODY> </HTML>
  • 20. CHECK.JSP PAGE:- <%-- DOCUMENT : CHECK CREATED ON : APR 2, 2012, 12:29:55 PM AUTHOR : BARDHAN --%> <%@PAGE CONTENTTYPE="TEXT/HTML" PAGEENCODING="UTF-8"%> <!DOCTYPE HTML> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=UTF-8"> <TITLE>JSP PAGE</TITLE> </HEAD> <BODY> <JSP:USEBEAN ID="LOGIN" CLASS="BEANS.LOGIN" SCOPE="PAGE"> <JSP:SETPROPERTY NAME="LOGIN" PROPERTY="*" /> </JSP:USEBEAN> YOUR NAME:<JSP:GETPROPERTY NAME="LOGIN" PROPERTY="NAME" /> <BR> YOUR PASSWORD IS:<JSP:GETPROPERTY NAME="LOGIN" PROPERTY="PASSWORD" /> <%BOOLEAN BA=LOGIN.GETRESULT(); IF(BA) { RESPONSE.SENDREDIRECT("WELCOME.JSP"); } ELSE{ OUT.PRINTLN("THIS IS NOT RIGHT USERNAME OR PASSWORD"); } %> </BODY> </HTML>
  • 21. • • Bean.login bean:- public void setName(String name) { /* this.name = name; * To change this template, choose } Tools | Templates public String getPassword() { * and open the template in the editor. return password; */ } package beans; public void setPassword(String password) { /** this.password = password; * } * @author BARDHAN public boolean getResult() { */ public class login if(this.name.equals("sanju")&&password.eq { uals("123")) private String name; { result=true; private String password; private boolean result; } else { public String getName() { result=false; return name; } } return result; } }
  • 22. DESCRIBING ACTION ELEMENTS IN JSP ????????? 4. .<JSP:param>:- This action element is used to pass the parameter to other action elements. For example <jsp:forward page=”hello.jsp”> <jsp:param name=”id” value=”12” /> </jsp:forward>
  • 23. DESCRIBING ACTION ELEMENTS IN JSP ????????? • 5.<jsp:include> :- • This action element is used to include any jsp file in your web page. • <jsp:include page=”header.jsp” flush=”true|false” /> • 6.<jsp:forward> :- • Used to forward request control to next page .For example • <jsp:forward page=”next.jsp” ></jsp:forward> • • 7.<jsp:expression>:- work like expression script • 8.<jsp:scriptlet> :- work like as script element • 9.<jsp:declaration> :-work as declaration element
  • 24. DESCRIBING THE JSP IMPLICIT OBJECTS……………………. JSP Implicit objects are described as follows 1. Application :- Used as Servlet Context object in servlets 2. Config:- Used as ServletConfig object in servlets 3. Out :- JSPWriter object to print any thing on jsp page 4. Page:- work like as Object class object 5. pageContext:- PageConext for JSP page 6. request: work like as ServletRequest object 7. response:- work like as ServletResponse Object in Servlets 8. session :- like as httpSession.