Third study: 1. Acquired from the bean and display (where INTARRAY is returned by Bean)
Java code:
1
2
Class = "ORG.
Apache.
Struts.
WebApp.
EXERCISE.
TestBean "/>
3
4
5
Correct Value TH>
6 |
Array Result TH>
7 | Indexed Result TH>
8 tr> <%
for
(
INT INDEX =
INDEX <
INDEX
)
{%>
9 |
10
11 <% = index *
10%>
12 td>
13 |
14
'<% = "intaRray [" index "]"%> "/>
15 td>
16
17
'<% = "Intindexed [" index "]"%> "/>
18 td>
19 TR> <%
}%>
20 TABLE>
twenty one
2. Display of the properties of nested beans (Nested is a property of TestBean, nested is a bean. Display the attribute value in NESTED)
Java code:
1
2
Class = "ORG.
Apache.
Struts.
WebApp.
EXERCISE.
TestBean "/>
3
4
5 Data Type TH>
6 | Correct Value TH>
7 | Test Result TH>
8 tr>
9 |
10
Boolean td>
11 |
12
13 td> 14 |
15
16 td>
17 tr>
18 |
19
Double td>
20 |
21
22 td>
23 |
24
25 td>
26 tr>
27 |
28 FLOAT TD>
29 |
30
31 td>
32 |
33
34 td>
35 tr>
36 |
37
INT td>
38 |
39
40 td>
41 |
42
43 td>
44 tr>
45 |
46 long td>
47 |
48
49 td>
50 |
51
52 td>
53 tr>
54 | 55 Short TD>
56 |
57
58 td>
59 |
60
61 td>
62 tr>
63 |
64
String td>
65 |
66
67 td>
68 |
69
70 td>
71 TR>
72 TABLE>
73
3. Nested Bean's in-array display (Nested is a property of TestBean, nested is a bean. Display the attribute value of the array in NESTED)
Java code:
1
2
Class = "ORG.
Apache.
Struts.
WebApp.
EXERCISE.
TestBean "/>
3
4
5 Correct Value TH>
6 |
Array Result TH>
7 | Indexed Result TH>
8 tr> <%
for
(
INT INDEX =
INDEX <
INDEX
)
{%>
9 |
10
11 <% = index *
10%>
12 td>
13 |
14
'<% = "nested.intarray [" index "]"%>' />
15 td>
16
17
'<% = "nested.intIndexed [" index "]"%>' /> 18 td>
19 TR> <%
}%>
20 TABLE>
twenty one
转载请注明原文地址:https://www.9cbs.com/read-113261.html
| | | | |