【Tips】使用自定义标签时遇到org.apache.jasper.JasperException: Unable to compile class for JSP

报错信息如下:

一月 25, 2017 9:28:20 下午 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /WEB-INF/tags/template/loggedOut.tag (line: 4, column: 1) /WEB-INF/jsp/base.jspf (line: 6, column: 8) <%@ page directive cannot be used in a tag file
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:291)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:97)
	at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:348)
	at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:381)
	at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:484)
	at org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1800)
	at org.apache.jasper.compiler.Parser.parse(Parser.java:142)
	at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
	at org.apache.jasper.compiler.ParserController.parseTagFileDirectives(ParserController.java:172)
	at org.apache.jasper.compiler.TagFileProcessor.parseTagFileDirectives(TagFileProcessor.java:498)
	at org.apache.jasper.compiler.ImplicitTagLibraryInfo.getTagFile(ImplicitTagLibraryInfo.java:181)
	at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1231)
	at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1473)
	at org.apache.jasper.compiler.Parser.parse(Parser.java:145)
	at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:201)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:600)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值