| FazBrowse Wikipedia Viewer | Main Page | | |
| Viewing: https://fr.wikipedia.org/wiki/JavaServer_Pages_Standard_Tag_Library |
| Contents |
|---|
| Core : Bibliothèque de base |
| Les variables |
| Les actions conditionnelles |
| Les itérations |
| Les urls |
| Liens externes |
| Notes et références |
Cet article est une ébauche concernant l’informatique.
| Créateur |
Sun Microsystems
La JavaServer Pages Standard Tag Library (JSTL) est un composant de la plate-forme JEE de développement. Elle étend la spécification JSP en ajoutant une bibliothèque de balises pour les tâches courantes, comme le travail sur des fichiers XML, l'exécution conditionnelle, les boucles et l'internationalisation. JSTL a été développée par la Java Community Process (JCP). Le \n <context-param>\n <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>\n <param-value>jdbc/data</param-value>\n </context-param>\n </web-app>\n"}}'><?xml version="1.0" encoding="ISO-8859-1"?> <web-appxmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <context-param> <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name> <param-value>jdbc/data</param-value> </context-param> </web-app>
\n <%@ taglib uri=\"http://java.sun.com/jsp/jstl/fmt\" prefix=\"fmt\" %>\n <%@ taglib uri=\"http://java.sun.com/jsp/jstl/xml\" prefix=\"x\" %>\n <%@ taglib uri=\"http://java.sun.com/jsp/jstl/sql\" prefix=\"sql\" %>\n <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n"}}'><%@tagliburi="http://java.sun.com/jsp/jstl/core"prefix="c"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/fmt"prefix="fmt"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/xml"prefix="x"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/sql"prefix="sql"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/functions"prefix="fn"%>
La bibliothèque Core propose les quelques balises essentielles pour utiliser le langage des JSP comme langage de templates en évitant d'y écrire des instructions et expressions directement en Java :
\n </c:if>\n"}}'><c:iftest="${empty variable}">
</c:if>
\n <c:when test=\"${expression1 == true}\">\n Expression 1\n </c:when>\n <c:when test=\"${expression2 == true}\">\n Expression 2\n </c:when>\n <c:otherwise>\n Autre chose\n </c:otherwise>\n </c:choose>\n"}}'><c:choose>
<c:whentest="${expression1 == true}">
Expression1
</c:when>
<c:whentest="${expression2 == true}">
Expression2
</c:when>
<c:otherwise>
Autrechose
</c:otherwise>
</c:choose>
\n Paramètre ${thisParam.key} = ${thisParam.value}\n </c:forEach>\n"}}'><c:forEachitems="${param}"var="thisParam"varStatus="variableStatus">
Paramètre${thisParam.key}=${thisParam.value}
</c:forEach>
\n ${thisVar}\n </c:forTokens>\n"}}'><c:forTokensvar="thisVar"items="var1;var2;var3"delims=";">
${thisVar}
</c:forTokens>
\n <c:param name=\"param1\" value=\"18\"/>\n </c:url>\n"}}'><c:urlvalue="/page2">
<c:paramname="param1"value="18"/>
</c:url>
|
|---|