tag library question
I want to ask, why the codes below still give me error when I run on the browser.
The error is like this:
org.apache.jasper.JasperException: Exception in JSP: /welcome.jsp:19
16: <jsp:param name="type" value="orig" />
17: </jsp:include></td>
18:
19: <sql:query var="cities">
20: SELECT CITY_NAME, COUNTRY, AIRPORT FROM CITIES ORDER BY CITY_NAME, COUNTRY
21: </sql:query>
22:
What happen to this sql actually???
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<HTML>
<HEAD>
<TITLE>LowFare Air Airlines</TITLE>
</HEAD>
<BODY>
<c:choose>
<c:when test="${empty cookie}">
<jsp:forward page="Register.jsp" />
</c:when>
<c:otherwise>
<c:forEach var="cookieVal" items="${cookie}">
<c:if test="${cookieVal.key == 'derbyCookie'}">
<c:if test="${empty sessionScope.username}">
<jsp:forward page="Login.jsp" />
</c:if>
</c:if>
</c:forEach>
</c:otherwise>
</c:choose>
<c:if test="${nodirectflights == 'true'}" >
<p>
There were no direct flights between ${cityNameFrom}
and ${cityNameTo}. <br>
Please select another flight.
</p>
</c:if>
<H3>Welcome to LowFare Air, <c:out value="${username}" />!</H3>
<p>
Please proceed to select a flight.
</p>
<form action="CheckFlightsServlet" method="post">
<table width="50%">
<tr>
<td valign="top">
<b>Departure Date:</b><br>
<jsp:include page="/CalendarServlet">
<jsp:param name="type" value="orig" />
</jsp:include>
</td>
<sql:query var="cities">
SELECT CITY_NAME, COUNTRY, AIRPORT FROM APP.CITIES ORDER BY CITY_NAME, COUNTRY
</sql:query>
<td>
<b>Origin:</b><br>
<select name="from" size="4">
<c:forEach var="city" items="${cities.rows}">
<option value="${city.airport}"> ${city.city_name}, ${city.country}</option>
</c:forEach>
</select>
<br><br>
</td>
</tr>
<tr>
<td valign="top">
<b>Class:</b><br>
<select name="class" size="1">
<option value="Economy">Economy</option>
<option value="Business">Business</option>
<option value="First Class">First Class</option>
</select>
</td>
<td>
<b>Destination:</b><br>
<select name="to" size="4">
<c:forEach var="city" items="${cities.rows}">
<option value="${city.airport}"> ${city.city_name}, ${city.country}</option>
</c:forEach>
</select>
<br><br>
</td>
</tr>
<tr>
<td colspan="2">
<p align="left"><b><input type="checkbox" name="directonly" checked> Direct Flights Only</input></b></p>
</td>
</tr>
</table>
</br>
<input type="submit" name="submit">
</form>
</BODY>
</HTML>
Hello
|