Basic knowledge of jsp and El expressions, and jspel expressions
1. jsp BASIC script and syntax format
Jsp script <% String name = "Tubo"; // java code %> jsp expression <% = name %>
2. jsp execution Principle
Jsp execution principle:
1) a jsp file -? Translate into a Java file -? _ 01_hello.java
2) Compile: a java file is compiled into a class file.
3) Call method: tomcat execute _ jspService (): jsp service method
3. Nine built-in jsp objects
PageContext // jsp context Object HttpRequest // request Object HttpSession // session Object (session) ServletContext // application Page // Object Throwable // exception JspWriter // outServletConfig // config
4. EL built-in object
PageContext -- not only the built-in objects in EL, but also the built-in jsp object pageScoperquestScopesessionScopeapplicationScopeparam. the built-in object for obtaining parameters <% String name = "Tubo"; % >$ {param ['name']}5. jstl Technology
Use of jstl: You must import jar packages -- jstl-1.2.jar-to use these labels
<% @ Taglib uri = "https://java.sun.com/jstl/core" prefix = "c" %> // uri is the file ending with tld associated with the jar package
Content here
// The prefix is
Content here
Page --> page domain request-> request domain session-> session domain application-> application domain
// When the boolean Type in test is true, the statement or code here is executed.
// Logic code
// Logic code