Second study: 1. View the resource file tag. For use:
Display <% = WebXML%> Display is that HTML is not converted <>,
Java code:
1
2 <%
3 java.
Util.
ArrayList Data =
New java.
Util.
ArrayList
(
);
4 DATA.
Add
("First"
);
5 DATA.
Add
("SECOND"
);
6 DATA.
Add
("Third"
);
7 DATA.
Add
("Fourth"
);
8 DATA.
Add
("Fiffh"
);
9 PageContext.
SetaTribute
("List", DATA, PageContext.
Page_scope
);
10%>
11
After defining a collection. Use the Boolean, New Boolean ( True ) ); 4 PageContext. SetaTribute ("TEST1. Double ", New Double ( 321. 0 ) ); 5 pageContext. SetaTribute ("TEST1. Float, New Float ( (Float) ) 123. 0 ) ); 6 pagecontext. SetaTribute ("TEST1. Int " New Integer ( 123 ) ); 7 pagecontext. SetaTribute ("TEST1. " New Long ( 321 ) ); 8 PageContext. SetaTribute ("TEST1. SHORT ", New Short ( (Short) ) 987 ) ); 9 PageContext. SetaTribute ("TEST1. String "," this is a string " ); 10%> 11 Displayed in the following manner: Boolean: <% = pageContext.getattribute ("test1.boolean")%> or