21_JSP - CSI 3540 Structures, techniques et normes du Web...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSI 3540 Structures, techniques et normes du Web Wednesday, March 31, 2010 Objectifs : 1. Concevoir des documents JSP 2. Se familiariser ave le cycle de dveloppement dune application Web 3. Dployer une application Web Lectures : Web Technologies (2007) 8 Pages 463472 Sparer la programmation de la prsentation laide de JSP Wednesday, March 31, 2010 Plan 1. Bibliothques de balises JSTL 2. MVC et JSP Wednesday, March 31, 2010 master.jspx jsp:include Wednesday, March 31, 2010 main.jspx <html xmlns:jsp="http://java.sun.com/JSP/Page " xmlns:core="http://java.sun.com/jsp/jstl/core " xmlns="http://www.w3.org/1999/xhtml "> <jsp:directive.page contentType="text/html" /> <jsp:output omit-xml-declaration="yes" doctype-root-element="html" doctype-public="-//W3C//DTD XHTML Basic 1.0//EN" doctype-system="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd " /> <head> <title>jsp:include</title> </head> <body> < jsp : include page = "${ param.page }" /> </body> </html> Wednesday, March 31, 2010 GetDate.jspx < jsp : root xmlns:jsp="http://java.sun.com/JSP/Page " xmlns:core="http://java.sun.com/jsp/jstl/core " xmlns:fmt="http://java.sun.com/jsp/jstl/fmt " xmlns="http://www.w3.org/1999/xhtml " version = "2.0" > <jsp:useBean id="date" class="java.util.Date" /> <h2>Voici la date du jour :</h2> <p> <fmt:setLocale value="fr_CA" /> <fmt:formatDate value="${date}" type="both" dateStyle="full"/> </p> </ jsp : root > Wednesday, March 31, 2010 static.jspx <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page " xmlns="http://www.w3.org/1999/xhtml " version = "2.0" > <p> Page dynamique/contenu statique. </p> </jsp:root> Wednesday, March 31, 2010 index.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd "> <html xmlns="http://www.w3.org/1999/xhtml " lang="fr-CA"> <head> <title>jsp:include</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <ul> <li>< a href = "main.jspx?page=GetDate.jspx " >GetDate</ a ></li> <li>< a href = "main.jspx?page=static.jspx " >static</ a ></li> </ul> </body> </html> Wednesday, March 31, 2010 Wednesday, March 31, 2010 $ telnet localhost 8080 Trying ::1... Connected to localhost. Escape character is '^]'. GET /Test/GetDate.jspx HTTP/1.1 HOST: localhost HTTP/1.1 200 OK X-Powered-By: JSP/2.1 Server: GlassFish v3 Set-Cookie: JSESSIONID=f7b2322d1b0d655af0215c3a2c0a; Path=/Test Content-Type: text/xml;charset=UTF-8 Content-Language: fr-CA Content-Length: 66 Date: Tue, 30 Mar 2010 14:30:35 GMT <h2>Voici la date du jour :</h2><p>mardi 30 mars 2010 10:30:35</p> Wednesday, March 31, 2010 jsp:directive.include <html xmlns:jsp="http://java.sun.com/JSP/Page " xmlns:core="http://java.sun.com/jsp/jstl/core " xmlns="http://www.w3.org/1999/xhtml "> <jsp:directive.page contentType="text/html" /> < jsp : directive.include file = "copyright.jspf" /> <jsp:output omit-xml-declaration="yes" doctype-root-element="html" doctype-public="-//W3C//DTD XHTML Basic 1.0//EN"doctype-public="-//W3C//DTD XHTML Basic 1....
View Full Document

This note was uploaded on 06/07/2010 for the course CSI ITI1520 taught by Professor Marcelturcotte during the Spring '10 term at University of Ottawa.

Page1 / 88

21_JSP - CSI 3540 Structures, techniques et normes du Web...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online