当前位置: 首页 > 工具软件 > Taglibs > 使用案例 >

netbeans 配置JSTL 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在

白吕恭
2023-12-01

1.我用的版本是JSTL 1.1.2
2.我把两个jar包放在项目lib下和web-inf-lib下
3.我修改了配置文件内容:

<?xml version="1.0" encoding="UTF-8"?> checklogin foodiesquad.servlet.checklogin checklogin /checklogin 30 http://java.sun.com/jsp/jstl/fmt /WEB-INF/fmt.tld /WEB-INF/fmt-1_0.tld http://java.sun.com/jsp/jstl/fmt-rt /WEB-INF/fmt-rt.tld http://java.sun.com/jsp/jstl/core /WEB-INF/c.tld http://java.sun.com/jsp/jstl/core-rt /WEB-INF/c-rt.tld /WEB-INF/c-1_0.tld http://java.sun.com/jsp/jstl/sql /WEB-INF/sql.tld /WEB-INF/sql-1_0.tld http://java.sun.com/jsp/jstl/sql-rt /WEB-INF/sql-rt.tld
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/x</taglib-uri>
<taglib-location>/WEB-INF/x.tld</taglib-location>
 <taglib-location>/WEB-INF/x-1_0.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/x-rt</taglib-uri>
<taglib-location>/WEB-INF/x-rt.tld</taglib-location>
</taglib>
</jsp-config>
然后还是有那个错误: /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:146: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_out_0 = (org.apache.taglibs.standard.tag.rt.core.OutTag) _jspx_tagPool_c_out_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.OutTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:146: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_out_0 = (org.apache.taglibs.standard.tag.rt.core.OutTag) _jspx_tagPool_c_out_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.OutTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:146: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_out_0 = (org.apache.taglibs.standard.tag.rt.core.OutTag) _jspx_tagPool_c_out_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.OutTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:164: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _jspx_tagPool_c_set_var_value_scope_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:164: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _jspx_tagPool_c_set_var_value_scope_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:164: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _jspx_tagPool_c_set_var_value_scope_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:184: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_if_0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:184: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_if_0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:184: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_if_0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:214: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_out_1 = (org.apache.taglibs.standard.tag.rt.core.OutTag) _jspx_tagPool_c_out_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.OutTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:214: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_out_1 = (org.apache.taglibs.standard.tag.rt.core.OutTag) _jspx_tagPool_c_out_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.OutTag.class); ^ /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/build/generated/src/org/apache/jsp/JSP/jsp1_jsp.java:214: 错误: 程序包org.apache.taglibs.standard.tag.rt.core不存在 org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_out_1 = (org.apache.taglibs.standard.tag.rt.core.OutTag) _jspx_tagPool_c_out_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.OutTag.class); ^ 12 个错误 /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/nbproject/build-impl.xml:978: The following error occurred while executing this line: /Users/hmqhmq/NetBeansProjects/FOODIESQUAD2/nbproject/build-impl.xml:321: Compile failed; see the compiler error output for details. 构建失败 (总时间: 0 秒) 我一脸懵逼。。 # 解决方法: 直接在netbeans下导入它的jar包 不用新建web-inf-lib!!! 然后就好了。 ![在这里插入图片描述](https://img-blog.csdnimg.cn/20191127104546260.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Mzc0NDg4Mw==,size_16,color_FFFFFF,t_70) 激动!
 类似资料: