关于自定义标签报空指针异常:"at org.apache.jasper.compiler.TldCache.getTaglibXml(TldCache.java:97) "

tomcat8对相对路径路径的不是很好。

可以在web.xml文件中设置好tld的路径,

然后JSP中直接<%@ taglib prefix="xia" uri="myTagLib" %>

web.xml文件添加以下配置:
<jsp-config>
    <taglib>
        <taglib-uri>myTagLib</taglib-uri>
        <taglib-location>/includes/tt.tld</taglib-location>
    </taglib>
</jsp-config>

时间: 2024-10-13 07:52:48

关于自定义标签报空指针异常:"at org.apache.jasper.compiler.TldCache.getTaglibXml(TldCache.java:97) "的相关文章

报错:org.apache.jasper.JasperException: /index.jsp (line: 1, column: 17) equal symbol expected

现象:写了如下一个jsp文件,导入需要用到的两个包: 运行结果报错:org.apache.jasper.JasperException: /index.jsp (line: 1, column: 17) equal symbol expected at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41) at org.apache.jasper.compiler.ErrorDis

freemarker自定义标签报错(八)

1.错误描述 freemarker.core.ParseException: Token manager error: freemarker.core.TokenMgrError: Unknown directive: #assgin on line: 18, column: 151, in template: tag.ftl in tag.ftl at freemarker.template.Template.<init>(Template.java:174) at freemarker.c

freemarker自定义标签报错(三)

freemarker自定义标签 1.错误描述 freemarker.core.ParseException: Encountered " " at line 14, column 12 in myself.ftl. Was expecting one of: <STRING_LITERAL> ... <RAW_STRING> ... "false" ... "true" ... <INTEGER> ... &l

freemarker自定义标签报错(四)

freemarker自定义标签 1.错误描述 六月 05, 2014 11:31:35 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template processing error: "Error executing macro: write\nrequired parameter: nums is not specified." Error executing macro: write required pa

freemarker自定义标签报错(七)

1.错误描述 六月 09, 2014 11:11:09 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template processing error: "Expression a is undefined on line 27, column 23 in tag.ftl." Expression a is undefined on line 27, column 23 in tag.ftl. The probl

freemarker自定义标签报错(一)

freemarker自定义标签 1.错误描述 freemarker.core.ParseException: Token manager error: freemarker.core.TokenMgrError: Unknown directive: #macro on line: 12, column: 101, in template: myself.ftl in myself.ftl at freemarker.template.Template.<init>(Template.java

freemarker自定义标签报错(二)

freemarker自定义标签 1.错误描述 freemarker.core.ParseException: Unexpected end of file reached. at freemarker.core.FMParser.generateParseException(FMParser.java:4702) at freemarker.core.FMParser.jj_consume_token(FMParser.java:4573) at freemarker.core.FMParser

Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:5

jsp页面出现如下异常: Stacktrace: at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481) at org.apache.jasper.servlet.JspServlet.serviceJ

org.apache.jasper.compiler.TldLocationsCache tldScanJar

我在页面上一点击查询.console以下就有例如以下的红色文字: 2014-8-19 15:09:27 org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were sc