2017.11.16 Javaweb-------The eighth chapter EL, JSTL, Ajax technology

Source: Internet
Author: User

The eighth chapter EL, JSTL, Ajax technology

~ ~ EL (expression language) is a language of expressions
~ ~ JSTL (JSP standard tag library) is an open source JSP standards tag libraries
~ ~ Ajax (asynchronous JavaScript and XML) is the use of JavaScript and extensible language (XML)

1.表达式语言EL  输出动态信息有以下三种:      JSP内置对象out :<%out.print("要输出的信息");%>      JSP表达式:<%=new java.util.Date();%>      表达式语言:${user.name}  EL语法:      都是以 "${"开始  “}”结束,基本语法格式:${expression}      在页面上显示表达式expression的值,即获取范围变量的值,范围变量就是使用setAttribute 方法存到page request session application 4种范围内的对象。          将对象user1以属性user存放在session范围内:          User user1=new User();//创建对象实例user1          session.setAttribute("user",user1);//将对象实例user1以属性user保存在session中          User user1=(user)session.getAAttribute("user");         out.print(user1.getName());//输出对象user1的属性那么的值EL 表示为:  ${sessionScope.user.name} 或${user.name}2.存取运算符    在EL中,对数据值的存取是通过“[]” “.” 来实现的    其格式为:${name.property}  ${name["property"]} 或者 ${name[property]}

2017.11.16 Javaweb-------The eighth chapter EL, JSTL, Ajax technology

Related Article

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.