java中jsp页面使用jstl标签

新手上路,请多包涵

为什么使用在jsp中使用jstl标签项目下有jstl的jar包发布到Tomcat上也有jar为什么还是报下面的错啊?求解,纠结很久了,谢谢
type Exception report

message 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

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: 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

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
阅读 4.3k
1 个回答
  • 复制一个 jstl.jar 和 standard.jar 包到 WEB-INF/lib 下。

  • 把 tld 文件的目录也复制到 WEB-INF 中

修改 web.conf,配置 taglib:

<jsp-config> 
   <taglib> 
    <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> 
    <taglib-location>/WEB-INF/c.tld</taglib-location> 
   </taglib> 

   <taglib> 
    <taglib-uri>http://java.sun.com/jsp/jstl/xml</taglib-uri> 
    <taglib-location>/WEB-INF/x.tld</taglib-location> 
   </taglib> 

   <taglib> 
    <taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri> 
    <taglib-location>/WEB-INF/fmt.tld</taglib-location> 
   </taglib> 

   <taglib> 
    <taglib-uri>http://java.sun.com/jsp/jstl/sql</taglib-uri> 
    <taglib-location>/WEB-INF/sql.tld</taglib-location> 
   </taglib> 
</jsp-config> 
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题