Define entities in jspBean
<Jsp: useBean id = "clu" class = "cn. domain. CacluBean"> </jsp: useBean>
<Jsp: getProperty property = "propertyname" name = "clu"> obtain the bean property value and output the value to the page;
EL expression:$ {Object name}
When an el expression is used to retrieve data, it usually uses a. sign or a. Sign. []
PageContext. findAttribute ("data"); // page, request, session, and application query order
<! -- Create a bean if no bean is found on the page -->
<! -- The content in the TAG body is used only when bean is created (instantiated) -->
Jsp assigns values to bean:
<! -- Assign values manually -->
<Jsp: setProperty property = "age" name = "personbean" value = "23"/>
<! -- Request Parameter Value assignment. The request data supports converting strings into eight basic data types -->
<Jsp: setProperty property = "age" name = "personbean" param = "age"/>
<Jsp: setProperty property = "birthdty" name = "personbean" value = "<% = new Date () %>"/>
<Jsp: setProperty property = "*" name = "clu"> set bean attributes and assign values to beans using all request parameters;
//Import Java class:
<% @ Page import = "cn. domain. *" %>
<! -- Static inclusion: It is included during compilation. All JSPs contained are compiled into a servlet, which is more efficient than dynamic inclusion. -->