我是你妈

编程就好跟打游戏一样,各种攻略,各种副本,各种各种,有意思!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

偶在页面里引入了标签如下:   
  <%@   taglib   prefix="c"   uri="http://java.sun.com/jstl/core"   %>   
  出错提示:   
    
  org.apache.jasper.JasperException:   /index.jsp(0,0)   This   absolute   uri   (http://java.sun.com/jstl/core)   cannot   be   resolved   in   either   web.xml   or   the   jar   files   deployed   with   this   application   
  at   org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)   
  at   org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)   
  at   org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)   
  at   org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:307)   
  at   org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:340)   
  at   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:378)   
  at   org.apache.jasper.compiler.Parser.parseElements(Parser.java:795)   
  at   org.apache.jasper.compiler.Parser.parse(Parser.java:122)   
  at   org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)   
  at   org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)   
  at   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)   
  at   org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)   
  at   org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)   
  at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)   
  at   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)   
  at   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)   
  at   javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   

 

对于JAVAEE5.0及以上版本,使用的是jstl1.2.jar的版本,很简单,只需要将jstl1.2.jar拷贝到Tomcat安装目录下的lib下即可。

对于jstl1.1.jar的话,则需要在web.xml中增加taglib,引入对tld文件,还要加上standard.jar。

 

posted on 2014-11-04 08:29  杜兰德  阅读(506)  评论(0)    收藏  举报