TP JSP : déployer chaque TP sous forme d'archive war



Similar documents
Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat

Thursday, February 7, DOM via PHP

Brazil + JDBC Juin 2001, douin@cnam.fr

TP : Système de messagerie - Fichiers properties - PrepareStatement

Introduction au BIM. ESEB Seyssinet-Pariset Economie de la construction contact@eseb.fr

Langages Orientés Objet Java

Annexe - OAuth Introduction. Xavier de Rochefort xderoche@labri.fr - labri.fr/~xderoche 15 mai 2014

Aucune validation n a été faite sur l exemple.

Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS)

Remote Method Invocation

TP1 : Correction. Rappels : Stream, Thread et Socket TCP

POB-JAVA Documentation

Connecting Custom Services to the YAWL Engine. Beta 7 Release

RAPPORT FINANCIER ANNUEL PORTANT SUR LES COMPTES 2014

Calcul parallèle avec R

Cours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé.

JMETER - WEBSERVICE TEST PLAN

In this chapter, we lay the foundation for all our further discussions. We start

Modifier le texte d'un élément d'un feuillet, en le spécifiant par son numéro d'index:

Archived Content. Contenu archivé

In-Home Caregivers Teleconference with Canadian Bar Association September 17, 2015

TP : Configuration de routeurs CISCO

ExempleRMI.java. // Fichier de defintion des droits et proprietes // System.setProperty("java.security.policy","../server.java.

Audit de sécurité avec Backtrack 5

TP N 10 : Gestion des fichiers Langage JAVA

Installation. Installation centreon + nagios mai LISTE DES PRE-REQUIS. Nagios/centreon Paquets divers. 1.1.

Personnalisez votre intérieur avec les revêtements imprimés ALYOS design

TIMISKAMING FIRST NATION

Haslingden High School French - Y7 1st MFL Set 4. Block B - HOMEWORK Au collège Year 8 Block A

Web Applications. Originals of Slides and Source Code for Examples:

Introduction to Entity Beans

Archived Content. Contenu archivé

Configuration Guide. SafeNet Authentication Service. SAS Agent for AD FS

Sun Management Center Change Manager Release Notes

FOR TEACHERS ONLY The University of the State of New York

Archived Content. Contenu archivé

Réponse à une question de Roger Bastide Document 40

>

Archived Content. Contenu archivé

Sur 1 Bit bit n 4 bit n 3 bit n 2 bit n 1 bit n 4 bit n 3 bit n 2 bit n 1 bit n 4 bit n 3 bit n 2 bit n 1

--Nom: Laurent Senécal-Léonard

Archived Content. Contenu archivé

Revised May 24, 2006 MANITOBA TO HOST 2006 WESTERN PREMIERS CONFERENCE, NORTH AMERICAN LEADERS SUMMIT

DHI a.s. Na Vrsich 51490/5, , Prague 10, Czech Republic ( t.metelka@dhi.cz, z.svitak@dhi.cz )

CSS : petits compléments

Licence Informatique Année Exceptions

Applying this template to your existing presentation


site et appel d'offres

Active Offer of Service in both Official Languages

Introduction ToIP/Asterisk Quelques applications Trixbox/FOP Autres distributions Conclusion. Asterisk et la ToIP. Projet tuteuré

AP FRENCH LANGUAGE AND CULTURE EXAM 2015 SCORING GUIDELINES

Enterprise Risk Management & Board members. GUBERNA Alumni Event June 19 th 2014 Prepared by Gaëtan LEFEVRE

Les Broadcast Receivers...

French 8655/S 8655/S. AQA Level 1/2 Certificate June Teacher s Booklet. To be conducted by the teacher-examiner between 24 April and 15 May 2014

Stockage distribué sous Linux

SunFDDI 6.0 on the Sun Enterprise Server

Hello World RESTful web service tutorial

Measuring Policing Complexity: A Research Based Agenda

ESMA REGISTERS OJ/26/06/2012-PROC/2012/004. Questions/ Answers

Simplify Your Web App Development Using the Spring MVC Framework

Web Programming II JSP (Java Server Pages) ASP request processing. The Problem. The Problem. Enterprise Application Development using J2EE

THE CITY OF TORONTO S JOB DEMANDS ANALYSIS AND JOB MATCH SYSTEM

Fichier export CSV des expéditions Palet System

Sélection adaptative de codes polyédriques pour GPU/CPU

MINING DATA BANK OF THE ACP STATES

Power Distribution System. Additional Information on page 2 See Page 2 Page 6. Eaton. See Page 2. Additional Information on page 2

TP #4 b. ClientBourse.java Classe principale du client graphique et fonction main.

Form Validation. Server-side Web Development and Programming. What to Validate. Error Prevention. Lecture 7: Input Validation and Error Handling

--- Vincent Hamel, hamv

DIRECTIVE ON ACCOUNTABILITY IN CONTRACT MANAGEMENT FOR PUBLIC BODIES. An Act respecting contracting by public bodies (chapter C-65.1, a.

Saruman Documentation

Comparing JavaServer Pages Technology and Microsoft Active Server Pages

Liste d'adresses URL

Les fragments. Programmation Mobile Android Master CCI. Une application avec deux fragments. Premier layout : le formulaire

Open call for tenders n SCIC C4 2014/01

Solaris 10 Documentation README

HEALTH CARE DIRECTIVES ACT

PROCEDURE INSERTION(NUM IN EMPLOYES.NUMEMP%TYPE, NOM VARCHAR2, PRENOM IN VARCHAR2, PPHOTO IN BLOB, SALAIRE IN NUMBER);

Technical Service Bulletin

Switching Power Supply XP POWER INC. SUITE 150, 1241 E DYER RD SANTA ANA CA 92705, USA XP POWER INC SUITE 150, 1241 E DYER RD SANTA ANA CA 92705, USA

Proposition d intervention

Archived Content. Contenu archivé

Archived Content. Contenu archivé

Measurement of the consumer s perception of cultural aspects of marketing gift

Optimizing Solaris Resources Through Load Balancing

Unrealized Gains in Stocks from the Viewpoint of Investment Risk Management

Transcription:

TP JSP : déployer chaque TP sous forme d'archive war TP1: fichier essai.jsp <HEAD><TITLE>Bonjour Le Monde JSP Exemple</TITLE> Bonjour Le Monde. Après déploiement regarder dans le répertoire work de l'application la servlet générée par le serveur d'application à partir de cette JSP. TP2: fichier premier.jsp <jsp:directive.include file="/entete.html" /> La date est <%=new Date() %> <jsp:directive.include file="/pied.html" /> fichier entete.html <HEAD><TITLE>ENTETE</TITLE> application JSP : premier exemple fichier pied.html <HEAD><TITLE>PIED</TITLE> 1/5 modulaire 2007 - TP JSP

copyright 2004 TP3: fichier deuxieme.jsp <jsp:directive.page import="java.util.*"/> private static String nom; private static String ville; private static Calendar datenais; private static String getnom() return nom; private static String getadresse() return ville; private static String getdatenais() return String.valueOf(datenais.get(Calendar.DAY_OF_MONTH))+"/"+String.valueOf(datenais.get(Calen dar.month))+"/"+string.valueof(datenais.get(calendar.year)); public void jspinit() nom = new String("Dupont"); ville = new String("PARIS"); datenais = new GregorianCalendar(1956, 5, 28); Mon nom est <%=getnom() %>, j'habite <%=getadresse() %> et je suis né le <%=getdatenais() %> <jsp:include page="deuxiemebis.jsp" flush="true"/> fichier deuxiemebis.jsp LA DATE DU JOUR EST <%=new Date() %> 2/5 modulaire 2007 - TP JSP

TP4: fichier troisieme.jsp LA DATE DU JOUR EST <%=new Date() %> TP5: fichier quatrieme.jsp <jsp:directive.page import="java.sql.*" errorpage="erreur.jsp?from=quatrieme.jsp"/> ResultSet resultat = null; Class.forName("org.postgresql.Driver"); Connection db = DriverManager.getConnection("jdbc:postgresql://localhost/mabasejsp", "lecoz", ""); Statement st = db.createstatement(); resultat = st.executequery("select libelle from tablejsp"); while(resultat.next()) Le LIBELLE est <%=resultat.getstring(1) %> 3/5 modulaire 2007 - TP JSP

fichier erreur.jsp jsp:directive.page iserrorpage="true"/> <HEAD><TITLE>ERREUR</TITLE> String from = (String) request.getparameter("from"); UNE ERREUR EST ARRIVEE SUR LA PAGE <%= from %> TP6: fichier cinquieme.jsp <HEAD><TITLE>HelloWorld w/ JavaBean</TITLE> public static class Toto private String valeur = new String("ABCDEF"); public void setvaleur(string v) valeur = v; public String getvaleur() return valeur; <jsp:usebean id="titi" scope="page" class="toto" type="toto"> </jsp:usebean> <jsp:setproperty name="titi" property="valeur" value="bonjour Le Monde" /> <h><%=titi.getvaleur() %></h> 4/5 modulaire 2007 - TP JSP

TP7: fichier sixieme.jsp <HEAD><TITLE>BONJOUR</TITLE> <jsp:usebean id="titi" scope="page" class="paquet.titi"/> <jsp:setproperty name="titi" property="libelle" value="dsfdsfsdfdsfds"/> <jsp:expression> titi.getlibelle() </jsp:expression> <jsp:getproperty name="titi" property="libelle"/> fichier Titi.java package paquet; public class Titi private String libelle = new String("ABCDEF"); public String getlibelle() return libelle; public void setlibelle(string v) libelle = v; Annexes : fichier web.xml <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> </web-app> 5/5 modulaire 2007 - TP JSP