Error using JSTL XML taglib - attribute xml does not accept any expressions

前端 未结 6 1616
遇见更好的自我
遇见更好的自我 2021-01-24 12:12

I\'m getting the following error when I try to use the JSTL XML taglib:

/server-side-transform.jsp(51,0) 
According to TLD or attribute directive in tag file,
at         


        
6条回答
  •  無奈伤痛
    2021-01-24 12:47

    Not exactly, you should use

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

    to use JSTL 1.1.

    Unfortunately the standard.jar files includes many versions of *.tld tag for eg.

    • c-1_0-rt.tld
    • c-1_0.tld
    • c.tld
    • fmt-1_0-rt.tld
    • fmt-1_0.tld
    • fmt.tld
    • fn.tld
    • permittedTaglibs.tld
    • scriptfree.tld
    • sql-1_0-rt.tld
    • sql-1_0.tld
    • sql.tld
    • x-1_0-rt.tld
    • x-1_0.tld
    • x.tld

    so by using

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

    you tell the jsp to specifically use JSTL 1.1 which btw fixes the above issue, if this does not work try using

    <%@ page isELIgnored="false" %>

    which basically tells jsp to evaluate EL.

    /srm

提交回复
热议问题