el Operator:
<% @page language= "java" contenttype= "text/html;charset=gb2312"%> <% @page import= "java.sql.*"%> <! DOCTYPE html>
El Processing built-in objects:
"." and "[]" symbols are used to access data.
${applicationscope.user.username}
${applicationscope.user[0].username}
${applicationscope.user[" User-name "]}
Passing a value through a variable must use the []
${applicationscope.user["Data"]}
Storage-related built-in objects
Built-in objects related to input
Cookie built-in objects
Header Built-in Object
Initparam built-in objects: Getting the environment variables set in the Web site
<% @page language= "java" contenttype= "text/html;charset=gb2312"%>
<! DOCTYPE html>
Pagecontex built-in objects
Use to get detailed information about a user request and page
<% @page language= "java" contenttype= "text/html;charset=gb2312"%> <!
DOCTYPE html>
el Accessor:
reads data in JavaBean using accessors
package com.javaweb.ch08; import java.util.*;//A simple JavaBean example public class person{//n
Ame Property private String name;
Age attribute private int age;
Sex property private String sex;
Friends property Private ArrayList friends;
The method public person (String name,int age,string sex) {this.name = name of the parameterless constructed method public person () {}//custom constructed;
This.age = age;
This.sex = sex;
}//Gets the property value of name public String GetName () {return name;
//Get the Age property value public int getage () {return age;
//Get Sex property value public String Getsex () {return sex;
//Sets the property of name, public void SetName (String name) {this.name = name;
//Set Age's property value public void setage (int age) {this.age = age;
}//Set sex property value public void Setsex (String sex) {this.sex = sex;
}//Set friends value public void setfriends (ArrayList friends) {this.friends = friends;
}//Get Friends Property value Public ArrayList getfriends () {return friends; }
}
<% @page language= "java" contenttype= "text/html;charset=gb2312%> <% @page import=" java.util.*, com.javaweb.ch08.* "%> <!
DOCTYPE html>
Using storage to read data in a map
<% @page language= "java" contenttype= "text/html;charset=gb2312"%> <% @page Import= "java.util.*,com.javaweb.ch08.*"%> <! DOCTYPE html>
Using memory to read data in an array
<% @page language= "java" contenttype= "text/html;charset=gb2312%> <%
@page import=" java.util.*, com.javaweb.ch08.* "%>
<! DOCTYPE html>
Complex applications of memory
<% @page language= "java" contenttype= "text/html;charset=gb2312%> <% @page import=" java.util.*, com.javaweb.ch08.* "%> <! DOCTYPE html>