weixin_42344646 2009-08-31 10:36
浏览 433
已采纳

Unable to read TLD "META-INF/taglib.tld"

I got an error when using tomcat,the below are the details.And I
looked over the source of jaser and found [location[1] =
"META-INF/taglib.tld";] in the
org.apache.jasper.compiler.TagLibraryInfoImpl.java and
TagPluginManager.java.I want to know how to solve it and why??
Thanks.
---------------my web.xml


/struts-tags
/WEB-INF/lib/struts2-core-2.1.6.jar

There is only struts-tag.tld in the struts2-core-2.1.6.jar.

Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to read TLD "META-INF/taglib.tld"
from JAR file
"file:/X:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/AccountMgr/WEB-INF/lib/struts2-core-2.1.6.jar":
java.lang.NullPointerException
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:181)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:182)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:429)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1439)
at org.apache.jasper.compiler.Parser.parse(Parser.java:137)
at
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:170)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:620)

  • 写回答

2条回答 默认 最新

  • walsh_bupt 2009-08-31 10:48
    关注

    在你的Web.xml去除下边的配置。
    [quote]

    /struts-tags
    /WEB-INF/lib/struts2-core-2.1.6.jar

    [/quote]

    如果在你的JSP页面中需要Struts2的标签,只需要在JSP页面中引入:
    [code="java"]<%@ taglib prefix="s" uri="/struts-tags"%>[/code]

    如果在你的JSP页面中既有EL表达式,又有Struts2的标签,那么直接在struts2里使用原el是不行的,如果想使用原EL的话可以通过配置使用

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:在跑ldsc数据整理的时候一直抱这种错误,要么--out识别不了参数,要么--merge-alleles识别不了参数(操作系统-linux)
  • ¥15 PPOCRLabel
  • ¥15 网友们我该怎么办啊,急
  • ¥15 混合键合键合机对准标识
  • ¥100 现在不懂的是如何将当前的相机中的照片,作为纹理贴图,映射到扫描出的模型上
  • ¥15 目标跟踪,计算机视觉
  • ¥15 魔霸ROG7 pro,win11.息屏后会显示黑屏,如图,如何解决?(关键词-重新启动)
  • ¥15 有没有人知道这是哪里出了问题啊?要怎么改呀?
  • ¥200 C++表格文件处理-悬赏
  • ¥15 Windows Server2016本地登录失败