Reference Citations - HerongYang.com - v2.95, by Herong Yang
Jakarta Taglibs, JSTL Problem
'JSTL - Core Library' tutorial was cited in a CodeGuru Forums article in 2004.
The JSTL - Core Library tutorial was cited in a CodeGuru Forums article in 2004. Note that my Geocities site has been moved to herongyang.com now.
Subject: Jakarta Taglibs, JSTL Problem
Date: Aug 16, 2004
Author: cjard
Source: http://www.codeguru.com/forum/archive/index.php/t-306357.html
>I've just started to play about with Tag Libraries, I can't get the
>basic loop to work.
><%@ page contentType="text/html; charset=iso-8859-1"
> language="java" import="java.sql.*" errorPage="" %>
><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
><html>
><head>
><title>Tomcat :: Development :: JSTL</title>
></head>
><body>
><c:forEach var="i" begin="1" end="10" step="1">
><c:out value="${i}" /><br/>
></c:forEach>
><hr/>
><c:out value="Doh! It's working!" />
></body>
></html>"Doh! It's working!" works, but the loops outputs "${i}",
>I'm like to get the basics working so I can more onto SQL & Jndi Tag
>Libraries.
>
>Is it JSTL?
>Is it my JSP Page?
>Is it my web.xml conf file?
...
try:
<c:forEach var="name" begin="${1}" end = "${10}" step="${1}">
<c:out value="${name} is my number" />
</c:forEach>
theory: begin = "1" makes it interpret a string, not a number.. ?
adapted from:
<?xml version="1.0"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jstl/core" version="1.2">
<!-- JstlPrimeNumbers.jsp - It doesn't work, can not change the index
Copyright (c) 2003 by Dr. Herong Yang
-->
<jsp:directive.page contentType="text/html"/>
<html><body>
...
http://www.geocities.com/herong_yang/jsp/jstl_core.html
stupid script languages, are always more trouble than they are worth..
sure, they may be simpler to look a tthan jsp, but they're a nuisance
when they go awry
Table of Contents
►Jakarta Taglibs, JSTL Problem
Dovecot SSL Warning (Not Error)
Cipher, byte[]s and Strings; oh my!
BodyTagSupport and JSP body-content
Invoking Remote Webservices from a Perl Client
IP Protection and Encryption Donation
Validate XML Documents in Java
GB2312 and Unicode Mapping Table