Java/JSTL/HTML Output
Содержание
Out Default Examples
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %> <html>
<head> <title>Out Default Examples</title> </head> <body>testit = <c:out value="${testit}" default="Default Value" /> </body>
</html>
</source>
Output a table
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.ru/jstl/core-rt" prefix="c-rt" %> <html>
<head> <title>Count to 10 Example(tracking even and odd)</title> </head> <body>
</c:set>
Out With Encode=true
<c:out value="${test}" escapeXml="true" />
Out With Encode=false
<c:out value="${test}" escapeXml="false" />
</body>
</html>
</source>
Simple calculation and output
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %> <html>
<head> <title>Out Examples</title> </head> <body>
Out Example
10 * 3 = <c:out value="${10*3}" />
</body>
</html>
</source>