SlideShare a Scribd company logo
1 of 23
Java Server Pages(JSP)
JavaServer Pages (JSP)
позволяют вам отделить
динамическую часть ваших
страниц от статического HTML.
Вы, как обычно, пишете обычный
код в HTML, используя для этого
любую программу для создания
Web страниц. Затем вы
заключаете динамическую часть
кода в специальные таги,
большинство которых начинаются
с "<%" и завершаются "%>".
Жизненный цикл jsp
First jsp
<html>
<head>
<title>
Hello World Sample
</title>
</head>
<body>
<h1>
<%
String name = request.getParameter("name");
if (name == null || name.length() == 0) {
%>
Hello, world !
<% } else {
%>
Hello, world ! I'm <%= name%>
<%
}
%>
</h1>
</body>
</html>
Структура каталога web-app в
каталоге src.
Синтаксис jsp.
The Scriptlet:<% code fragment %>
<html>
<head>
<title>Hello World</title></head>
<body> Hello World!<br/> <%
out.println("Your IP address is " +
request.getRemoteAddr()); %>
</body>
</html>
JSP Declarations:
<%! declaration; [ declaration; ]
+ ... %>
<%! int i = 0; %>
<%! int a, b, c; %>
<%! Circle a = new Circle(2.0); %>
JSP Expression:
<%= expression %>
<html>
<head>
<title>A Comment Test</title></head>
<body>
<p> Today's date: <%= (new
java.util.Date()).toLocaleString()%> </p>
</body> </html>
Today's date: 21-Sep-2015 21:24:25
JSP Comments:
<%-- This is JSP comment --%>
<html>
<head>
<title>A Comment test</title></head>
<body>
<h2>A Test of Comments</h2>
<%-- This comment will not be visible in
the page source --%>
</body>
</html>
JSP Directives:
<%@ directive attribute="value"
%>
<%@ page ... %>Defines page-
dependent attributes, such as
scripting language, error page, and
buffering requirements.
<%@ include ... %>Includes a file
during the translation phase.
<%@ taglib ... %>Declares a tag
library, containing custom actions,
used in the page
JSP Actions:
<jsp:action_name attribute="value" />
jsp:include Includes a file at the time the page is
requested
jsp:useBean Finds or instantiates a JavaBean
jsp:setProperty Sets the property of a JavaBean
jsp:getProperty Inserts the property of a
JavaBean into the output
jsp:forward Forwards the requester to a new page
jsp:plugin Generates browser-specific code that
makes an OBJECT or EMBED tag for the Java
plugin
jsp:element Defines XML elements dynamically.
jsp:attribute Defines dynamically defined XML
element's attribute.
jsp:body Defines dynamically defined XML
element's body.
jsp:text Use to write template text in JSP pages
and documents.
JSP Implicit Objects:
request This is the HttpServletRequest object
associated with the request.
response This is the HttpServletResponse object
associated with the response to the client.
out This is the PrintWriter object used to send output to
the client.
session This is the HttpSession object associated with
the request.
application This is the ServletContext object associated
with application context.
config This is the ServletConfig object associated with
the page.
pageContext This encapsulates use of server-specific
features like higher performance JspWriters.
page This is simply a synonym for this, and is used to
call the methods defined by the translated servlet class.
Exception The Exception object allows the exception
data to be accessed by designated JSP.
Простой проект с xml-базой
данных и jsp
Database in xml-file
Result
Link on project
https://sourceforge.net/p/jspexamplelogin/code/
Literature
http://www.javatpoint.com/login-form-in-jsp#
http://java-course.ru/student/book1/jsp/
http://www.tutorialspoint.com/jsp/jsp_syntax.htm
http://www.codenet.ru/webmast/java/jsp.php

More Related Content

What's hot

Ch. 9 jsp standard tag library
Ch. 9 jsp standard tag libraryCh. 9 jsp standard tag library
Ch. 9 jsp standard tag libraryManolis Vavalis
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Ayes Chinmay
 
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
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsVforce Infotech
 
Getting Started with Angular JS
Getting Started with Angular JSGetting Started with Angular JS
Getting Started with Angular JSAkshay Mathur
 
Jsp , javasportal, jsp basic,
Jsp , javasportal, jsp basic, Jsp , javasportal, jsp basic,
Jsp , javasportal, jsp basic, rupendra1817
 
Intro to Javascript and jQuery
Intro to Javascript and jQueryIntro to Javascript and jQuery
Intro to Javascript and jQueryShawn Calvert
 
Utilization of zend an ultimate alternate for intense data processing
Utilization of zend  an ultimate alternate for intense data processingUtilization of zend  an ultimate alternate for intense data processing
Utilization of zend an ultimate alternate for intense data processingCareer at Elsner
 
Filters in AngularJS
Filters in AngularJSFilters in AngularJS
Filters in AngularJSBrajesh Yadav
 
JavaScript and jQuery Basics
JavaScript and jQuery BasicsJavaScript and jQuery Basics
JavaScript and jQuery BasicsKaloyan Kosev
 
Controller in AngularJS
Controller in AngularJSController in AngularJS
Controller in AngularJSBrajesh Yadav
 

What's hot (20)

Jsp & struts
Jsp & strutsJsp & struts
Jsp & struts
 
Ch. 9 jsp standard tag library
Ch. 9 jsp standard tag libraryCh. 9 jsp standard tag library
Ch. 9 jsp standard tag library
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
 
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)
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web Applications
 
Getting Started with Angular JS
Getting Started with Angular JSGetting Started with Angular JS
Getting Started with Angular JS
 
J Query
J QueryJ Query
J Query
 
Ch. 7 beeing a jsp
Ch. 7 beeing a jsp     Ch. 7 beeing a jsp
Ch. 7 beeing a jsp
 
Jsp , javasportal, jsp basic,
Jsp , javasportal, jsp basic, Jsp , javasportal, jsp basic,
Jsp , javasportal, jsp basic,
 
jQuery basics
jQuery basicsjQuery basics
jQuery basics
 
Intro to Javascript and jQuery
Intro to Javascript and jQueryIntro to Javascript and jQuery
Intro to Javascript and jQuery
 
Learning jsp
Learning jspLearning jsp
Learning jsp
 
Built in filters
Built in filtersBuilt in filters
Built in filters
 
Utilization of zend an ultimate alternate for intense data processing
Utilization of zend  an ultimate alternate for intense data processingUtilization of zend  an ultimate alternate for intense data processing
Utilization of zend an ultimate alternate for intense data processing
 
Filters in AngularJS
Filters in AngularJSFilters in AngularJS
Filters in AngularJS
 
JSP
JSPJSP
JSP
 
JavaScript and jQuery Basics
JavaScript and jQuery BasicsJavaScript and jQuery Basics
JavaScript and jQuery Basics
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
Controller in AngularJS
Controller in AngularJSController in AngularJS
Controller in AngularJS
 
4. jsp
4. jsp4. jsp
4. jsp
 

Viewers also liked

Get started with docker &amp; dev ops
Get started with docker &amp; dev opsGet started with docker &amp; dev ops
Get started with docker &amp; dev opsAsya Dudnik
 
Java fx for interface
Java fx for interfaceJava fx for interface
Java fx for interfaceAsya Dudnik
 
Hibernate&ejb3 . part3.
Hibernate&ejb3 . part3.Hibernate&ejb3 . part3.
Hibernate&ejb3 . part3.Asya Dudnik
 
Work with my_sql_-_database_in_java
Work with my_sql_-_database_in_javaWork with my_sql_-_database_in_java
Work with my_sql_-_database_in_javaAsya Dudnik
 
Java.fundamentals
Java.fundamentalsJava.fundamentals
Java.fundamentalsAsya Dudnik
 
использование Hibernate java persistence.part 4.
использование Hibernate java persistence.part 4.использование Hibernate java persistence.part 4.
использование Hibernate java persistence.part 4.Asya Dudnik
 
Java fx for interface
Java fx for interfaceJava fx for interface
Java fx for interfaceAsya Dudnik
 
Work with my sql database in java
Work with my sql   database in javaWork with my sql   database in java
Work with my sql database in javaAsya Dudnik
 
Data bases in pictures
Data bases in picturesData bases in pictures
Data bases in picturesAsya Dudnik
 
Apache maven in java projects
Apache maven in java projectsApache maven in java projects
Apache maven in java projectsAsya Dudnik
 
Java.fundamentals
Java.fundamentalsJava.fundamentals
Java.fundamentalsAsya Dudnik
 
Work with xml in java
Work with xml in javaWork with xml in java
Work with xml in javaAsya Dudnik
 
Get started with docker &amp; dev ops
Get started with docker &amp; dev opsGet started with docker &amp; dev ops
Get started with docker &amp; dev opsAsya Dudnik
 
использование Hibernate java persistence.part 2.
использование Hibernate java persistence.part 2.использование Hibernate java persistence.part 2.
использование Hibernate java persistence.part 2.Asya Dudnik
 

Viewers also liked (20)

Get started with docker &amp; dev ops
Get started with docker &amp; dev opsGet started with docker &amp; dev ops
Get started with docker &amp; dev ops
 
Java fx for interface
Java fx for interfaceJava fx for interface
Java fx for interface
 
Hibernate&ejb3 . part3.
Hibernate&ejb3 . part3.Hibernate&ejb3 . part3.
Hibernate&ejb3 . part3.
 
MVC CTPP
MVC CTPPMVC CTPP
MVC CTPP
 
Work with my_sql_-_database_in_java
Work with my_sql_-_database_in_javaWork with my_sql_-_database_in_java
Work with my_sql_-_database_in_java
 
Java.fundamentals
Java.fundamentalsJava.fundamentals
Java.fundamentals
 
использование Hibernate java persistence.part 4.
использование Hibernate java persistence.part 4.использование Hibernate java persistence.part 4.
использование Hibernate java persistence.part 4.
 
Java fx for interface
Java fx for interfaceJava fx for interface
Java fx for interface
 
Web&java.jsf.
Web&java.jsf.Web&java.jsf.
Web&java.jsf.
 
Work with my sql database in java
Work with my sql   database in javaWork with my sql   database in java
Work with my sql database in java
 
Web&java. gwt
Web&java. gwtWeb&java. gwt
Web&java. gwt
 
Data bases in pictures
Data bases in picturesData bases in pictures
Data bases in pictures
 
Web&java. jsp
Web&java. jspWeb&java. jsp
Web&java. jsp
 
Apache maven in java projects
Apache maven in java projectsApache maven in java projects
Apache maven in java projects
 
Java.fundamentals
Java.fundamentalsJava.fundamentals
Java.fundamentals
 
Oracle database
Oracle databaseOracle database
Oracle database
 
Work with xml in java
Work with xml in javaWork with xml in java
Work with xml in java
 
Get started with docker &amp; dev ops
Get started with docker &amp; dev opsGet started with docker &amp; dev ops
Get started with docker &amp; dev ops
 
использование Hibernate java persistence.part 2.
использование Hibernate java persistence.part 2.использование Hibernate java persistence.part 2.
использование Hibernate java persistence.part 2.
 
Jdbc in java
Jdbc in javaJdbc in java
Jdbc in java
 

Similar to Web&java. jsp

Similar to Web&java. jsp (20)

JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server Page
 
Introduction to JSP.pptx
Introduction to JSP.pptxIntroduction to JSP.pptx
Introduction to JSP.pptx
 
JSP.pptx
JSP.pptxJSP.pptx
JSP.pptx
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSP
 
JSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESJSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGES
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
 
DataBase Connectivity
DataBase ConnectivityDataBase Connectivity
DataBase Connectivity
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7
 
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
 
J2EE jsp_01
J2EE jsp_01J2EE jsp_01
J2EE jsp_01
 
JavaServer Pages
JavaServer PagesJavaServer Pages
JavaServer Pages
 
Chap4 4 2
Chap4 4 2Chap4 4 2
Chap4 4 2
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Unit 4 web technology uptu
Unit 4 web technology uptuUnit 4 web technology uptu
Unit 4 web technology uptu
 
Unit 4 1 web technology uptu
Unit 4 1 web technology uptuUnit 4 1 web technology uptu
Unit 4 1 web technology uptu
 
JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)
 
Jsp sasidhar
Jsp sasidharJsp sasidhar
Jsp sasidhar
 
3.jsp tutorial
3.jsp tutorial3.jsp tutorial
3.jsp tutorial
 

More from Asya Dudnik

Ejb in java. part 1.
Ejb in java. part 1.Ejb in java. part 1.
Ejb in java. part 1.Asya Dudnik
 
Work with xml in java
Work with xml in javaWork with xml in java
Work with xml in javaAsya Dudnik
 
использование Hibernate java persistence.part 1.
использование Hibernate java persistence.part 1.использование Hibernate java persistence.part 1.
использование Hibernate java persistence.part 1.Asya Dudnik
 
Usage concurrence in java
Usage concurrence in javaUsage concurrence in java
Usage concurrence in javaAsya Dudnik
 

More from Asya Dudnik (7)

Threads in java
Threads in javaThreads in java
Threads in java
 
Ejb in java. part 1.
Ejb in java. part 1.Ejb in java. part 1.
Ejb in java. part 1.
 
Work with xml in java
Work with xml in javaWork with xml in java
Work with xml in java
 
использование Hibernate java persistence.part 1.
использование Hibernate java persistence.part 1.использование Hibernate java persistence.part 1.
использование Hibernate java persistence.part 1.
 
Usage concurrence in java
Usage concurrence in javaUsage concurrence in java
Usage concurrence in java
 
Work with UML
Work with UMLWork with UML
Work with UML
 
Spring in java
Spring in javaSpring in java
Spring in java
 

Recently uploaded

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 

Recently uploaded (20)

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 

Web&java. jsp

  • 2.
  • 3. JavaServer Pages (JSP) позволяют вам отделить динамическую часть ваших страниц от статического HTML. Вы, как обычно, пишете обычный код в HTML, используя для этого любую программу для создания Web страниц. Затем вы заключаете динамическую часть кода в специальные таги, большинство которых начинаются с "<%" и завершаются "%>".
  • 5. First jsp <html> <head> <title> Hello World Sample </title> </head> <body> <h1> <% String name = request.getParameter("name"); if (name == null || name.length() == 0) { %> Hello, world ! <% } else { %> Hello, world ! I'm <%= name%> <% } %> </h1> </body> </html>
  • 7. Синтаксис jsp. The Scriptlet:<% code fragment %> <html> <head> <title>Hello World</title></head> <body> Hello World!<br/> <% out.println("Your IP address is " + request.getRemoteAddr()); %> </body> </html>
  • 8. JSP Declarations: <%! declaration; [ declaration; ] + ... %> <%! int i = 0; %> <%! int a, b, c; %> <%! Circle a = new Circle(2.0); %>
  • 9. JSP Expression: <%= expression %> <html> <head> <title>A Comment Test</title></head> <body> <p> Today's date: <%= (new java.util.Date()).toLocaleString()%> </p> </body> </html> Today's date: 21-Sep-2015 21:24:25
  • 10. JSP Comments: <%-- This is JSP comment --%> <html> <head> <title>A Comment test</title></head> <body> <h2>A Test of Comments</h2> <%-- This comment will not be visible in the page source --%> </body> </html>
  • 11. JSP Directives: <%@ directive attribute="value" %> <%@ page ... %>Defines page- dependent attributes, such as scripting language, error page, and buffering requirements. <%@ include ... %>Includes a file during the translation phase. <%@ taglib ... %>Declares a tag library, containing custom actions, used in the page
  • 12. JSP Actions: <jsp:action_name attribute="value" /> jsp:include Includes a file at the time the page is requested jsp:useBean Finds or instantiates a JavaBean jsp:setProperty Sets the property of a JavaBean jsp:getProperty Inserts the property of a JavaBean into the output jsp:forward Forwards the requester to a new page jsp:plugin Generates browser-specific code that makes an OBJECT or EMBED tag for the Java plugin jsp:element Defines XML elements dynamically. jsp:attribute Defines dynamically defined XML element's attribute. jsp:body Defines dynamically defined XML element's body. jsp:text Use to write template text in JSP pages and documents.
  • 13. JSP Implicit Objects: request This is the HttpServletRequest object associated with the request. response This is the HttpServletResponse object associated with the response to the client. out This is the PrintWriter object used to send output to the client. session This is the HttpSession object associated with the request. application This is the ServletContext object associated with application context. config This is the ServletConfig object associated with the page. pageContext This encapsulates use of server-specific features like higher performance JspWriters. page This is simply a synonym for this, and is used to call the methods defined by the translated servlet class. Exception The Exception object allows the exception data to be accessed by designated JSP.
  • 14. Простой проект с xml-базой данных и jsp
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.