Tomcat 7和JSTL [英] Tomcat 7 and JSTL

查看:490
本文介绍了Tomcat 7和JSTL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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有Spec版本:Servlet 3.0,JSP 2.2,EL 2.2,所以不包括JSTL?

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

当我试过上传standard.jar和jstl.jar我遇到以下错误:

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


org.apache.jasper.JasperException:/ jsp / index。 jsp(第3行,第62列)无法从JAR文件jndi:/localhost/cp/WEB-INF/lib/standard.jar中读取TLDMETA-INF / c.tld:org.apache.jasper .JasperException:无法加载或实例化TagLibraryValidator类:org.apache.taglibs.standard。 tlv.JstlCoreTLV

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

我做了一些谷歌搜索,但我无法解决它,有些人说它可能是由相互冲突的版本引起的罐子。也许我不应该包括那些罐子并使用不同的JSTL网址?我的JSTL 1.1我认为,是否有JSTL 1.2的新URL?

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。

Tomcat has never included JSTL.

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

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)

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

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

这篇关于Tomcat 7和JSTL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆