【发布时间】:2011-01-27 07:53:23
【问题描述】:
我正在使用Struts-1。我开发了一个基于 struts 的 Web 应用程序。通过在 JSP 文件中插入以下行,我在 struts-taglib.jar 中提供的 JSP 页面中使用 struts 标记:
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>
现在,当我在本地系统上运行该应用程序时,它运行良好,但是当我将它部署到服务器上时,它显示以下异常:
org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-html cannot be resolved in either web.xml or the jar files deployed with this application
从上述异常看来,应用程序似乎没有找到struts-taglib.jar文件。
但我已将struts-taglib.jar 放在/WEB-INF/lib 目录中。那么问题出在哪里?
注意:您也可以查看Java - Problem in deploying Web Application了解更多信息
【问题讨论】:
-
您到底下载了哪个
struts-taglib.jar?您可以在此处发布其下载链接/说明吗? -
@BalusC 我下载了
Struts 1.3.10,taglib jar 文件名为struts-taglib-1.3.10.jar -
对不起,我忽略了它在@local 上有效,但在@prod 上失败的关键点。然后我不知道可能会在类路径中发生冲突,或者实际上是错误/错误的部署。
-
我在
war文件的清单文件中没有任何类路径条目,因此没有明确定义类路径,所以我认为类路径中没有冲突......至于就部署而言,我在服务器上粘贴了相同的war文件,我粘贴在本地服务器上。那么问题出在哪里? -
你能把你的 taglib 条目的内容发布到 web.xml 中吗?