Je reçois cette erreur lors de l'exécution de mon application sur la ligne 3 du fichier jsp. S'agit-il de mon fichier tld ou de mon fichier jsp?Que signifie cette erreur dans JSP? (Elément inconnu (rtexpvalue) dans l'attribut)
org.apache.jasper.JasperException: /DisplayAllOrders.jsp(3,62) PWC6106: élément inconnu (rtexpvalue) dans l'attribut.
Le fichier TLD:
<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" lns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd">
<tlib-version>1.0</tlib-version>
<short-name>week07_portfolio</short-name>
<uri>/WEB-INF/tlds/week07_portfolio</uri>
<tag>
<name>DisplayOrders</name>
<tag-class>tags.DisplayOrders</tag-class>
<body-content>JSP</body-content>
<variable>
<name-given>order</name-given>
<variable-class>beans.Order</variable-class>
<declare>true</declare>
<scope>NESTED</scope>
</variable>
<attribute>
<name>ordersListName</name>
<required>true</required>
<rtexpvalue>false</rtexpvalue>
</attribute>
</tag>
<tag>
<name>DisplayOrderLines</name>
<tag-class>tags.DisplayOrderLines</tag-class>
<body-content>JSP</body-content>
<variable>
<name-given>orderLine</name-given>
<variable-class>beans.OrderLine</variable-class>
<declare>true</declare>
<scope>NESTED</scope>
</variable>
<attribute>
<name>linesListName</name>
<required>true</required>
<rtexpvalue>false</rtexpvalue>
</attribute>
</tag>
</taglib>
le fichier JSP:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import="java.util.*, java.text.*, beans.*" %>
<%@ taglib uri="/WEB-INF/tlds/week07_portfolio" prefix="wk07" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<% if (session.getAttribute("orderList") == null)
{
throw new ServletException("No order list available");
}
int ctr = 0;
SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Week 07, Portfolio Exercise</title>
<link rel="stylesheet" type="text/css" href="Week07_Portfolio.css">
</head>
<body>
<h1>Week 07, Portfolio Exercise</h1>
<h2>Order list</h2>
<wk07:DisplayOrders ordersListName="orderList">
<table>
<tr class="header">
<td>Order Num: <%= order.getOrderNum() %></td>
<td>Customer: <%= order.getName() %></td>
<td>Date: <%= df.format(order.getOrderDate()) %></td>
</tr>
</table>
<% pageContext.setAttribute("orderLines", order.getOrderLines());
ctr = 0;
%>
<table>
<tr>
<th>Ref. Code</th>
<th>Item</th>
<th>Qty</th>
</tr>
<wk07:DisplayOrderLines linesListName="orderLines">
<tr<%= ctr++ % 2 == 0 ? " class=\"shaded\"" : ""%>>
<td><%= orderLine.getItem().getRefCode()%></td>
<td><%= orderLine.getItem().getName()%></td>
<td><%= orderLine.getQuantity()%></td>
</tr>
</wk07:DisplayOrderLines>
</table>
<p> </p>
</wk07:DisplayOrders>
</body>
J'ai besoin de nouvelles lunettes! – BalusC