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

Презентация:



Advertisements
Похожие презентации
S11-1PAT301, Section 11, October 2003 SECTION 11 ANALYSIS SETUP.
Advertisements

© 2009 Avaya Inc. All rights reserved.1 Chapter Two, Voic Pro Components Module Two – Actions, Variables & Conditions.
1/27 Chapter 9: Template Functions And Template Classes.
Loader Design Options Linkage Editors Dynamic Linking Bootstrap Loaders.
Copyright 2003 CCNA 4 Chapter 11 Scaling IP Addresses By Your Name.
Carousel from flshow.netflshow.net by Saverio CaminitiSaverio Caminiti.
© 2002 IBM Corporation Confidential | Date | Other Information, if necessary © Wind River Systems, released under EPL 1.0. All logos are TM of their respective.
© 2009 Avaya Inc. All rights reserved.1 Chapter Three, Voic Pro Advanced Functions Module Four – Voic Campaigns.
Eclipse Web Tools Platform Project © 2005 IBM Corporation Developing Web Services with Eclipse – Programming Examples Arthur Ryman IBM Rational
© 2006 Cisco Systems, Inc. All rights reserved. HIPS v Configuring Rules Rule Basics.
© 2005 Cisco Systems, Inc. All rights reserved. IPTX v Configuring Additional Cisco CallManager Express Features Configuring Cisco CallManager Express.
Unity3d Fomin Maxim 394 group. Unity is an integrated authoring tool for creating 3D video games or other interactive content such as architectural visualizations.
PAT312, Section 17, December 2006 S17-1 Copyright 2007 MSC.Software Corporation SECTION 17 ELEMENT PROPERTIES.
SSD1: Introduction to Information Systems SSD1: Introduction to Information Systems ISS, Wuhan University.
© 2001, Cisco Systems, Inc. CSIDS Chapter 10 IP Blocking Configuration.
Work with server by XMLRPC – library in Java For students Author: Dudnik Oxana.
Reference Feature Power Copy Destination CATPart Copied Feature Reference CATPart PowerCopy Reference Feature Copied Feature Instantiate Link to.
© Luxoft Training 2013 Annotations. © Luxoft Training 2013 Java reflection / RTTI // given the name of a class, get a "Class" object that // has all info.
© 2009 Avaya Inc. All rights reserved.1 Chapter Three, Voic Pro Advanced Functions Module One – Text to Speech.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Module Summary The multihomed customer network must exchange BGP information with both ISP.
Транксрипт:

Java Server Pages(JSP)

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

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

First jsp Hello World Sample <% String name = request.getParameter("name"); if (name == null || name.length() == 0) { %> Hello, world ! <% } else { %> Hello, world ! I'm <% } %>

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

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

JSP Declarations:

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

JSP Comments: A Comment test A Test of Comments

JSP Directives: Defines page- dependent attributes, such as scripting language, error page, and buffering requirements. Includes a file during the translation phase. Declares a tag library, containing custom actions, used in the page

JSP 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 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 gin/code/HEAD/tree/

Literature in-jsp# course.ru/student/book1/jsp/ syntax.htm sp.php