1, El's English is expression Language, translated into Chinese is "expression language." This is a scripting language for front-end programmers, and El does not have a "big difference" compared to Java expressions, and it seems somewhat "superfluous" to the backend programmer.
2, however, We can not force every front-end programmer to learn Java,el compared to java, the cost of learning is lower and easier to understand.
3, in the previous written code practice test, first put scriptlet to ban, (el is also can be banned)
<?XML version= "1.0" encoding= "UTF-8"?><Web-appxmlns= "http://xmlns.jcp.org/xml/ns/javaee"Xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"xsi:schemalocation= "http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"version= "3.1"><jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <scripting-invalid>true</scripting-invalid> </jsp-property-group> </jsp-config> <servlet> <Servlet-name>Hi</Servlet-name> <Servlet-class>Sample.addfriends</Servlet-class> </servlet> <servlet-mapping> <Servlet-name>Hi</Servlet-name> <Url-pattern>/hobbypage.do</Url-pattern> </servlet-mapping></Web-app>
This time again to visit the JSP page containing scriptlet,
4, in essence, el and Scriptlet are similar, and finally are converted To. Java-->.class
5 、。。。
<jsp:usebean ....> can be used either to create objects or to get Objects.
6, <jsp:usebean ....> can have body
7, in a word, in the final analysis into a servlet.
Recommended Reading
1. scriptlet in jsp--the Classic book does not explain what is scriptlet
2. Syntax in JSP
Supplement to "Head first Servlets and JSP" note 21:el and <jsp:usebean ....>