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

 About This Book

 Reference Citations in 2016

 Reference Citations in 2015

 Reference Citations in 2014

 Reference Citations in 2013

 Reference Citations in 2012

 Reference Citations in 2011

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

Reference Citations in 2004

 HelloWeb Quick Start Guide

 Float vs Double

 J2SE Unicode 转化为 GB2312

 Cookies Don't Persist

 tomcat problem

Jakarta Taglibs, JSTL Problem

 Dovecot SSL Warning (Not Error)

 Cipher, byte[]s and Strings; oh my!

 BodyTagSupport and JSP body-content

 Codifica Base64

 Java: Catching Stack Overflow

 Invoking Remote Webservices from a Perl Client

 IP Protection and Encryption Donation

 Validate XML Documents in Java

 Java - Boolean

 GB2312 and Unicode Mapping Table

 CST 365/465 - Web Programming I

 Reference Citations in 2003

 PDF Printing Version