Supplement to "Head first Servlets and JSP" note 21:el and <jsp:usebean ....>

Source: Internet
Author: User

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 ....>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.