wood burning stoves*
The moose likes JSP and the fly likes JSP XML Compliant does not display loop results Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP XML Compliant does not display loop results" Watch "JSP XML Compliant does not display loop results" New topic

JSP XML Compliant does not display loop results

Clinton Morrison

Joined: Jun 28, 2007
Posts: 24
When the results page is being displayed it does not display the results for ${animals}. It just outputs Could be:. However when I convert it back to a standard jsp it displays ${animals}. I am using Tomcat and jsp version 2.0.

Thanks in advance

<html xmlns:c="http://java.sun.com/jsp/jstl/core">
<title>Animal Results</title>
<h1>Animal Recommendations JSP</h1>
<c:forEach var="animals" items="${results}">
<td>Could be:<jsp:text>${animals}</jsp:text></td>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Animal Selection Page</title>
<h1 align="center">Animal Selection Page</h1>
<form method="POST" action="SelectAnimal.do">Select animal
<select name="color" size="1">
</select> <br />
<br />
<center><input type="submit" value="Submit" /></center>
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60774

Why would you be using the JSP Document Format (XML) instead of the "normal" syntax? The Doc syntax is not intended for hand coding. The markup requirements are too stringent and it's easy to run afoul of them -- as you have discovered.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
wood burning stoves
subject: JSP XML Compliant does not display loop results
Similar Threads
Problem displaying a dynamic table on a JSP....
javascript error: object expected
Firefox doesnt find my File : Beer Selection Problem
Problem getting the Beer Selection Page screen shot
form action question???