Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 4th, 2008, 04:53 AM
Registered User
 
Join Date: Jun 2007
Location: Sepang, Selangor, Malaysia.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.