我尝试在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请求的资源不可用.