cannot be resolved in either web.xml or the jar files deployed with this application

解决方案 »

  1.   

    你用的标签JSTL1.0 如果你用的是apache的实现的话,添加standard.jar jstl.jar到你的项目;
    看看jar包内容。
    --standard.jar/meta-inf/c-1.0-rt.tld
    <taglib>
      <tlib-version>1.0</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>c_rt</short-name>
      <uri>http://java.sun.com/jstl/core_rt</uri>
      <display-name>JSTL core RT</display-name>
      <description>JSTL 1.0 core library</description>
    ----------------------------------------------------
    如果想使用JSTL1.1的那么你的tomcat必须支持jsp2.0一般都是tomcat4以上吧,
    而且web.xml的
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
        version="2.4"> 以这个开头, 和standard.jar-JSTL-meta的具有相同的namespace,那么
    JSTL所有的标签你才能正常运行,--standard.jar/meta-inf/c.tld
    <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
        version="2.0">
        
      <description>JSTL 1.1 core library</description>
      <display-name>JSTL core</display-name>
      <tlib-version>1.1</tlib-version>
      <short-name>c</short-name>
      <uri>http://java.sun.com/jsp/jstl/core</uri>
      

  2.   

    嗯,3楼说的好!!支持!
    我用的是MyEclipse6.0 /Tomcat6.0,可以自动添加JSTL1.0或者JSTL1.1!
    好像不用自己写taglib描述文件(c.tld)?
      

  3.   

    我用的是MyEclipse6.0,自动添加jstl后,为什么我在页面添加
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>时,会出现错误提示呢?
    说找不到这个标签??????????????????????