Struts1.2.4 study experience! (3)

xiaoxiao2021-03-06  59

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

10

Correct Value

6

Array Result

7

Indexed Result

8 <%

for

(

INT INDEX =

INDEX <

INDEX

)

{%>

9

11 <% = index *

10%>

12

13

14

'<% = "intaRray [" index "]"%> "/>

15

16

17

'<% = "Intindexed [" index "]"%> "/>

18

19 <%

}%>

20

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

10

19

28

37

46

55

64

Data Type

6

Correct Value

7

Test Result

8

9

Boolean

11

12

13 14

15

16

17

18

Double

20

21

22

23

24

25

26

27

FLOAT

29

30

31

32

33

34

35

36

INT

38

39

40

41

42

43

44

45

long

47

48

49

50

51

52

53

54

Short

56

57

58

59

60

61

62

63

String

65

66

67

68

69

70

71

72

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

10

Correct Value

6

Array Result

7

Indexed Result

8 <%

for

(

INT INDEX =

INDEX <

INDEX

)

{%>

9

11 <% = index *

10%>

12

13

14

'<% = "nested.intarray [" index "]"%>' />

15

16

17

'<% = "nested.intIndexed [" index "]"%>' /> 18

19 <%

}%>

20

twenty one

转载请注明原文地址:https://www.9cbs.com/read-113261.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.045, SQL: 9