What phase is the JSP JSPL evaluated in?

I know the life cycle of a JSP page, but I wondered when I started using JSTL. My question is, at what phase of the JSP life cycle are these JSTL tags evaluated? , for example, in the jsp translation phase or in the maintenance phase.

+5
source share
2 answers

In translation phase

Custom tags are converted into calls to the tag handler that implements the custom tag.

When you execute this JSP (which occurs after a successful compilation (translation)), they actually start and display the result in response.

+8
source

JSTL is evaluated during the compilation (or translation) phase of the JSP. You can check this with stacktrace if an exception is thrown:

 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) 
+2
source

Source: https://habr.com/ru/post/1232534/


All Articles