Tag: El expression gets data from a specified field the properties of the Ask Bean gets the array and the map and the elements in the list El operator in addition to the El built-in objects associated with four domain property spaces1. El Expression:-El,expression Language,
EL expression, EL expressionOn the JSP 2.0 page, we use the following elements to call the expression language:$ {Expression}EL can appear in the template Text of the JSP page or in the attributes of the JSP tag.The following expressions are used in JSP template text:The EL expression is used in JSP standard Action att
Java web basics-jsp EL expressions and el expressionsJava web basics-jsp EL expression 1. EL expression Introduction
EL is short for Expression Language. In jsp, EL plays a major role in obtaining data and replacing the script exp
EL expressions and el expressions
EL Expression. The full name is Expression Language. It was originally a language customized by JSTL 1.0 to facilitate data access. At that time, EL could only be used in JSTL labels. After JSP2.0, EL became part of the JSP specification and
El expression1. El Introduction1) syntax structure$ {Expression}2) [] and. OperatorEl provides two operators:. and [] to access data.When the attribute name to be accessed contains some special characters, such as. Or? If it is not a letter or number, you must use [].For example:$ {User. My-name} should be changed to $ {user ["My-name"]}If you want dynamic values, you can use [] instead of dynamic values. F
Introduction to EL expressions is required (recommended). Introduction to el expressions is required.
To make JSP writing easier. The expression language is inspired by ECMAScript and XPath expressions. It provides methods to simplify expressions in JSP.
Jsp el language definition
Expression Language (e l) Objective: To make JSP writing easier.
The expression lan
Use of Jsp built-in objects and EL expressions, and jsp built-in el expressions
I. built-in JSP objects (9 built-in JSP objects)
Type of the JSP built-in object reference nameRequest HttpServletRequestResponse HttpServletResponseSession HttpSession (with a switch: the value of the session attribute of the page command)Application ServletContextConfig ServletConfigPage this (current Servlet object)Exception
1. EL Expressions OverviewEl (express lanuage) expression can be embedded inside the JSP page, reduce the writing of JSP script, El appears to replace the JSP page script writing.2. El extracts data from the domain (El's most important role)JSP script: El expression replaces the above script: ${requestscope.name}El's m
Use El expressions to intercept string/get list length instances. el expressions
$ {Fn: substring (wjcd. lrsj, 0, 16 )}
Use the functions function to obtain the list length.
${fn:length(list)}
Function Description Example
Fn: containsDetermine whether the string contains another string
Fn: containsIgnoreCaseDetermine whether the string contains another string (case-insensitive)
Fn: endsWithJudge whether
Self-defined functions in EL expressions, el expressions
Step 1:
Create a func. tld file under the WEB-INF/tld/directory as follows:
Step 2:The JAVA processing function code is as follows:
package com.lss.page.function;public class PageFunction {public static String testFunction(int num, long l, String str) {return num + "___" + l + "__" + str;}}
Step 3:
JSP uses this function
JSP header import:
"Func
JSP-09-use EL to display data, jsp-09-el dataObjective: To make JSP writing easier. 9.1 EL expression
$ {EL expression }:: {unsername}
Operator: "." OPERATOR: attribute used to access objects $ {news. title}
"[]" OPERATOR: attribute used to access objects $ {news ["title"]}
Used to access arrays or collections $ {newsl
EL operator (web basic learning notes 17) and el learning notesI. EL syntax 1.1. syntax structure
$ {Expression}1.2 [] and. EL provide. and [] operators to access data.
When the attribute name to be accessed contains some special characters, such as. Or? If it is not a letter or number, you must use []. Example: $ {use
Dynamic page technology EL, dynamic page el
1. EL Overview:
EL expressions can be embedded inside JSP pages to reduce the compilation of JSP scripts.
EL appears to replace the compiling of scripts on JSP pages.
EL's most important role is to retrieve data from the domain:
I
Chapter 1 Common EL expressions and chapter 1 el expressions
ElMost commonIn the following scenarios:
Read attributes from the configuration file
If the value is missing, configure the default value.
El internal String use String method
Three-object Operator
Regular Expression
System properties)
Call Original system functions
Direct file injection
Read
The background data is transmitted to the foreground using the EL expression. The quotation marks and the following data are truncated:, el expression
Problem description:
The background data is transmitted to the foreground using the EL expression. The quotation marks and subsequent data are truncated:
For example:
Front-end page:
Html:
Solution:
1. A simple
EL expression-1, el expression
EL provides the. and [] operators to navigate data. The two represent the same:
$ {SessionScope. user. sex}
Equal
$ {SessionScope. user ["sex"]}
. And [] can also be used together, as follows:
$ {SessionScope. shoppingCart [0]. price}
The returned result is the price of the first item in shoppingCart.
However, there are two
Tomcat 7 javax. el. ELException, javax. el. jar
Today, when deploying the SSH project, we found a very strange problem. The project had no problem at tomcat6.0, but javax. el. ELException occurred when deploying the project to Tomcat 7 on the server.At first, I thought it was because the jar package was not correctly configured, The jstl and standard versions wer
The key summary of using El Expression in JS: Use El expression in JS to be sure to add double quotesThe EL expression is used in JS control, and the source code is as follows:Java code
var selected = ${requestscope.xxxxform.recordnumperpage}
This always JS error, because requestScope.xxxxForm.recordNumPerPage is null at the first time. So under the
The key summary of using El Expression in JS: Use El expression in JS to be sure to add double quotesThe EL expression is used in JS control, and the source code is as follows:Java code
var selected = ${requestscope.xxxxform.recordnumperpage}
This always JS error, because requestScope.xxxxForm.recordNumPerPage is null at the first time. So under the
[When the bid is set] EL expression, when the bid is set, el expression
The Design and Implementation of the secondary trading platform for Learning Resources ".
Today is July 22, May 14. The interim check has passed and the first draft of the paper will be submitted next week. The current progress is as follows: Registration, logon, and basic functions are completed.
Certificate ----------------------
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.