在 JSP JSTL 的哪个阶段进行评估?
in which phase of JSP JSTL is evaluated?
我知道 JSP 页面的生命周期,但我想知道我是什么时候开始使用 JSTL 的。 我的问题是,这个 JSTL 标签在 JSP 生命周期的哪个阶段评估? 例如在 jsp 翻译阶段或服务阶段。
Custom tags are converted into calls to the tag handler that implements the custom tag.
当您执行 JSP( 成功编译(翻译) 后发生)时,它们实际上 运行 并将输出渲染为响应。
JSTL 在 JSP 编译(或翻译)阶段进行评估。您可以通过堆栈跟踪检查是否抛出异常:
org.apache.jasper.JasperException: /index.jsp (line: 8, column: 23) No tag "urfafl" defined in tag library imported with prefix "c"
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:199)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1215)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1452)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
我知道 JSP 页面的生命周期,但我想知道我是什么时候开始使用 JSTL 的。 我的问题是,这个 JSTL 标签在 JSP 生命周期的哪个阶段评估? 例如在 jsp 翻译阶段或服务阶段。
Custom tags are converted into calls to the tag handler that implements the custom tag.
当您执行 JSP( 成功编译(翻译) 后发生)时,它们实际上 运行 并将输出渲染为响应。
JSTL 在 JSP 编译(或翻译)阶段进行评估。您可以通过堆栈跟踪检查是否抛出异常:
org.apache.jasper.JasperException: /index.jsp (line: 8, column: 23) No tag "urfafl" defined in tag library imported with prefix "c"
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:199)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1215)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1452)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)