I have the following jsp file
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*" %>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.0">
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Home</title>
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div class="container">
<jsp:include page="/WEB-INF/embeds/header.jsp"/>
<div class="content">
<h>Hotel Results</h>
<table cellpadding="15">
<c:forEach var="result" items="${search}">
<tr>
<td style="padding: 0px 0px 8px 10px">
<c:out value="${search.roomDescription}"/>
</td>
</tr>
</c:forEach>
</table>
</div>
</div>
</body>
</html>
and a room object that holds the int id and String roomDescription and I wanted to print these out from the arraylist i’ve used to store all the rooms from the results I got through ResultSet. This code seems to error with
org.apache.jasper.JasperException: /Results.jsp(4,5) Invalid standard action
Can someone tell me whats wrong with it? (My room class consists of those two variables and getters and setters). I’ve tested the size of the array list and I know I’m adding in room objects.
I think that the problem that is causing the exception is caused by the
<jsp:root>element, which according to this page is malformed. If I am reading the linked page correctly, there should be a matching</jsp:root>tag at the end of the JSP.Even if this isn’t the exact problem, the exception messages says that the problem is at “[4,5]”: i.e. line #4 character #5 of the JSP file.