我嘗試在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
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"
>
language="java"
contentType="application/xhtml+xml;charset=UTF-8"
/>
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"
/>
Check Out
CheckOut
Delivery Details |
---|
Contact Name: |
Delivery Address: |
Credit Card Details |
Name on Credit Card: |
Credit Card Number: |
Credit Card Expiry Date: |
ERROR: You can't check out an empty shopping cart!
在web.xml
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee;http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
eshop
ShopServlet
ShopServlet
eshop.ShopServlet
base
/shop
imageURL
/images/
jdbcDriver
com.mysql.jdbc.Driver
dbURL
jdbc:mysql://localhost:3306/shop
dbUserName
root
dbPassword
ShopServlet
/shop/*
COOKIE
我該如何解決這個問題?
我在eclipse中再次附加元件目,我剛剛更改了web.xml中的代碼.
servlet-mapping>
ShopServlet
/ShopServlet
URL為:localhost:8080 / eshopx / ShopServlet
錯誤消息已更改
description請求的資源不可用.