Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics 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:55 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 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
 
Old March 10th, 2008, 07:41 AM
Registered User
 
Join Date: Jul 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

make sure jstl.jar and standard.jar are in their proper places.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Anchor tag visited CSS related question mat41 Classic ASP Basics 0 April 16th, 2008 05:55 PM
Tag library for field level role based security mmalik_altaf Pro JSP 0 June 7th, 2006 05:02 AM
Can/How i use Java Bean & Tag Library in servlet nigam.anand Servlets 0 May 9th, 2006 09:40 PM
creating smart tag library Medes VS.NET 2002/2003 0 April 16th, 2006 02:56 PM
creating smart tag library Medes Visual Studio 2005 0 April 10th, 2006 03:29 PM





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