小编ros*_*ary的帖子

属性前缀fn与任何导入的标记库都不对应

我尝试在Tomcat v7服务器上运行我的jsp代码,但它失败了.

org.apache.jasper.JasperException:/jsp/Checkout.jspx(line:32,column:51)属性前缀fn与任何导入的标记库都不对应

但我的jsp代码有fn定义

的xmlns:FN = "http://java.sun.com/jsp/jstl/functions"

我的jsp代码:Checkout.jspx

    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root
     xmlns:jsp="http://java.sun.com/JSP/Page"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     xmlns:fn="http://java.sun.com/jsp/jstl/functions" 
     xmlns:eshop="urn:jsptld:/WEB-INF/tlds/eshop.tld"
     version="2.1"
     >
    <jsp:directive.page
     language="java"
     contentType="application/xhtml+xml;charset=UTF-8"
     />
<jsp:output omit-xml-declaration="false"/>
<jsp:output
  doctype-root-element="html"
  doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
  doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  />
<c:url var="cssUrl" value="/css/eshop.jspx"/>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Check Out</title>
  <link rel="stylesheet" href="${cssUrl}" type="text/css"/>
  </head>
<body>
<jsp:include page="TopMenu.jspx" flush="true"/>
<jsp:include page="LeftMenu.jspx" flush="true"/>
<div class="content">
  <h2>CheckOut</h2>
  <c:choose>
    <c:when test="${fn:length(shoppingCart) > 0}">
      <form action="">
        <input type="hidden" name="action" value="orderConfirmation"/>
        <table class="checkout">
          <tr>
            <th colspan="2">Delivery Details</th>
            </tr>
          <tr>
            <td>Contact Name:</td>
            <td><input type="text" name="contactName"/></td>
            </tr> …
Run Code Online (Sandbox Code Playgroud)

java jsf jsp tomcat

7
推荐指数
1
解决办法
8683
查看次数

标签 统计

java ×1

jsf ×1

jsp ×1

tomcat ×1