Tomcat 7和JSTL(Tomcat 7 and JSTL)

系统教程 行业动态 更新时间:2024-06-14 16:59:47
Tomcat 7和JSTL(Tomcat 7 and JSTL)

我用Eclipse Tomcat编写了一个Web应用程序,它可以在我的本地Tomcat 7上运行,当我尝试在Tomcat 7上发布它时,发生以下错误:

SEVERE:Servlet.service()for servlet [obliquid.servlet.Index]在上下文中使用路径[/ cp]抛出异常[绝对uri: http://java.sun.com/jsp/jstl/core : http://java.sun.com/jsp/jstl/core无法解析web.xml或与此应用程序一起部署的jar文件]

Tomcat 7具有“Spec version:Servlet 3.0,JSP 2.2,EL 2.2”,因此不包括JSTL?

当我尝试上传standard.jar和jstl.jar时,出现以下错误:

org.apache.jasper.JasperException:/jsp/index.jsp(line:3,column:62)无法从JAR文件“jndi:/ localhost / cp / WEB-INF”读取TLD“META-INF / c.tld” /lib/standard.jar“:org.apache.jasper.JasperException:无法加载或实例化TagLibraryValidator类:org.apache.taglibs.standard.tlv.JstlCoreTLV

我做了一些谷歌搜索,但我不能排除,有人说可能是因为罐子的冲突版本造成的。 也许我不应该包括那些jar和使用不同的JSTL url? 我的JSTL 1.1我想,是否有一个新的JSTL 1.2的URL?

我应该怎么做来解决问题,使这个应用程序运行?

I wrote a web application with Eclipse Tomcat and it works on my local Tomcat 7, when I tried to publish it online on a Tomcat 7, I had the following error:

SEVERE: Servlet.service() for servlet [obliquid.servlet.Index] in context with path [/cp] threw exception [The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application]

Tomcat 7 has "Spec versions: Servlet 3.0, JSP 2.2, EL 2.2", so JSTL is not included?

When I tried to upload standard.jar and jstl.jar I had the following error:

org.apache.jasper.JasperException: /jsp/index.jsp (line: 3, column: 62) Unable to read TLD "META-INF/c.tld" from JAR file "jndi:/localhost/cp/WEB-INF/lib/standard.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

I did some googling, but I couldn't sort it out, some said it could be caused by conflicting versions of the jars. Maybe I should not include those jars and use a different JSTL url? Mine is for JSTL 1.1 I think, is there a new URL for JSTL 1.2?

What should I do to solve the problem and make this application run?

最满意答案

Tomcat从来没有包括JSTL。

你应该把jstl和标准jar放在WEB-INF/lib (你已经完成了),并确保你有权读取它们(chmod)

你的URI是正确的,它应该工作(在这里工作)

Tomcat has never included JSTL.

You should put the jstl and standard jars in WEB-INF/lib (you've done that), and make sure you have the permissions to read them (chmod)

Your URI is correct and it should work (works here)

更多推荐

本文发布于:2023-04-17 09:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/ceed0e5eff37672f2f2df7e8a9b91697.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Tomcat   JSTL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!