Презентация, доклад на тему Работа с WEB & Java. JSP (для студентов старших курсов университетов)

JavaServer Pages (JSP) позволяют вам отделить динамическую часть ваших страниц от статического HTML. Вы, как обычно, пишете обычный код в HTML, используя для этого любую программу для создания Web страниц. Затем вы заключаете динамическую часть кода

Слайд 1Java Server Pages(JSP)

Java Server Pages(JSP)

Слайд 3JavaServer Pages (JSP) позволяют вам отделить динамическую часть ваших страниц от

статического HTML. Вы, как обычно, пишете обычный код в HTML, используя для этого любую программу для создания Web страниц. Затем вы заключаете динамическую часть кода в специальные таги, большинство которых начинаются с "<%" и завершаются "%>".
JavaServer Pages (JSP) позволяют вам отделить динамическую часть ваших страниц от статического HTML. Вы, как обычно, пишете

Слайд 4
Жизненный цикл jsp

Жизненный цикл jsp

Слайд 5First jsp

    
        
            Hello World Sample
        
    
 
    
        
            

name.length() == 0) {
            %>
            Hello, world !
            <%            } else {
            %>
            Hello, world ! I'm <%= name%>
            <%
        }
            %>
        
    

First jsp                        Hello World Sample                                                 Hello, world !                        Hello, world ! I'm                         

Слайд 6Структура каталога web-app в каталоге src.

Структура каталога web-app в каталоге src.

Слайд 7Синтаксис jsp.
The Scriptlet:


Hello World Hello

World!
<% out.println("Your IP address is " + request.getRemoteAddr()); %>

Синтаксис jsp.The Scriptlet: Hello World Hello World!

Слайд 8JSP Declarations:

= 0; %>
<%! int a, b, c; %>
<%! Circle a = new Circle(2.0); %>
JSP Declarations:

Слайд 9JSP Expression:


A Comment Test

Today's

date: <%= (new java.util.Date()).toLocaleString()%>



Today's date: 21-Sep-2015 21:24:25

JSP Expression:  A Comment Test  Today's date:   Today's date: 21-Sep-2015 21:24:25

Слайд 10JSP Comments:


A Comment test


A Test of Comments


<%-- This comment will not be visible in the page source --%>


JSP Comments:  A Comment test A Test of Comments

Слайд 11JSP Directives:
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 Directives:  Defines page-dependent attributes, such as scripting language, error page, and buffering requirements.Includes a file

Слайд 12JSP Actions:
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 Actions:  jsp:include Includes a file at the time the page is requestedjsp:useBean Finds or instantiates

Слайд 13JSP 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.
JSP Implicit Objects: request This is the HttpServletRequest object associated with the request.response This is the HttpServletResponse

Слайд 14Простой проект с xml-базой данных и jsp

Простой проект с xml-базой данных и jsp

Слайд 15Database in xml-file

Database in xml-file

Слайд 22Link on project
https://sourceforge.net/p/jspexamplelogin/code/HEAD/tree/

Link on projecthttps://sourceforge.net/p/jspexamplelogin/code/HEAD/tree/

Слайд 23Literature
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

Literaturehttp://www.javatpoint.com/login-form-in-jsp#http://java-course.ru/student/book1/jsp/http://www.tutorialspoint.com/jsp/jsp_syntax.htmhttp://www.codenet.ru/webmast/java/jsp.php

Что такое shareslide.ru?

Это сайт презентаций, где можно хранить и обмениваться своими презентациями, докладами, проектами, шаблонами в формате PowerPoint с другими пользователями. Мы помогаем школьникам, студентам, учителям, преподавателям хранить и обмениваться учебными материалами.


Для правообладателей

Яндекс.Метрика

Обратная связь

Email: Нажмите что бы посмотреть