Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
|
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 4th, 2008, 04:53 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to winsonkkp
Default taglib 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





Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ question Edward King C++ Programming 1 July 3rd, 2008 07:02 AM
Chapter 5 web.xml missing taglib tylerp BOOK: Beginning JavaServer Pages 1 May 3rd, 2006 05:49 PM
Taglib question jorgen BOOK: Expert One-on-One J2EE Design and Development 3 May 12th, 2004 01:02 PM
if else question hoonboon69 Javascript 1 August 8th, 2003 07:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.