L'objectif de ce tépé est de se familiariser avec les technologies Java côté serveur.
RéponsesLes réponses sont affichées dans ce style là. |
Nous allons créer un nouveau répertoire dans l'arborescence de Tomcat, qui va contenir notre nouvelle application Web.
<?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> <display-name>Mon appli Web</display-name> <description> Mon appli Web - TP Servlet/JSP </description> </web-app>Pour faire connaître votre application, déployez là ou -plus simplement- redémarrez le serveur. Lancez un navigateur avec http://localhost:8080/test/Essai1.jsp.
<html> <head> <title>JSP Test</title> </head> <body> <h1>JSP Test</h1> <%for (int i=1; i<6; i++) {%> <p><%=i%></p> <%}%> </body> /<html>
Solution de cette partie dans un prochain TP. |
<?xml version="1.0" encoding="UTF-8"?> <order:order xmlns:order="urn:inria.fr-order" order-id="2" customer="Bill Gates" address="Redmond" credit-card="098765"> <order:cd> <order:album>The joshua tree</order:album> <order:artist>U2 </order:artist> <order:price>14.95</order:price> <order:qty>1</order:qty> </order:cd> <order:cd> <order:album>best of </order:album> <order:artist>Rolling stones </order:artist> <order:price>18.95</order:price> <order:qty>2</order:qty> </order:cd> </order:order>
Modifiez :