much_ado.jsp
来自「jakarta-taglibs」· JSP 代码 · 共 68 行
JSP
68 行
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0" prefix="xtags" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Much Ado Demo</title>
<link rel="stylesheet" href="examples.css" type="text/css">
</head>
<body>
<xtags:parse uri="/much_ado.xml"/>
<h1><xtags:valueOf select="/PLAY/TITLE"/></h1>
<xtags:forEach select="/PLAY/ACT">
<h2><xtags:valueOf select="TITLE"/></h2>
<table cellspacing="0" cellpadding="2" bgcolor="#000000" border="1">
<xtags:forEach id="scene" select="SCENE">
<xtags:variable id="title" select="TITLE/text()"/>
<tr bgcolor="#dddddd">
<td>Scene</td>
<td><b><%= title %></b></td>
</tr>
<tr bgcolor="#eeeeee">
<td valign="top">Speakers</td>
<td>
<xtags:forEach id="speaker" select="SPEECH/SPEAKER" sort="." distinct="true">
<xtags:choose>
<xtags:when test=".='HERO'">
<b><xtags:valueOf select="."/></b>
Our hero! in scene: <%= title %>
</xtags:when>
<xtags:otherwise>
<xtags:valueOf select="."/>
</xtags:otherwise>
</xtags:choose>
<xtags:if test=".='Messenger'">.
This is act
<xtags:valueOf select="../../../TITLE"/>
<%--
The following breaks on Tomcat 4.0.b3 due to setting property
of type Object with a String value.
<xtags:valueOf select="../TITLE" context="<%= scene %>"/>
--%>
</xtags:if>
<br>
</xtags:forEach>
</td>
</tr>
</xtags:forEach>
</table>
</xtags:forEach>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?