Struts1.2.4 learning experience! (6)

xiaoxiao2021-03-06  54

Sixth Learning: 1. Logic Judgment Tags:

Java code:

1

2 Define some variables

3

Class = "ORG.

Apache.

Struts.

WebApp.

EXERCISE.

TestBean "/> <%

4

String bool1 = "

True ";

5

String bool2 = "

False

6

String str1 = "this is a string";

Seduce

String str2 = "less Than";

8

String str3 = "xyz greater Than";

9%>

10 equal

11 <%

4

String Doub1 = "

321.

0 ";

5

String doub2 = "

111.

0 ";

6

String Doub3 = "

333.

0 ";

Seduce

String long1 = "

321 ";

8

String long2 = "

111 ";

9

String long3 = "

333 ";

10

String short1 = "

987 "

11

String short2 = "

654 ";

12

String short3 = "

999 "

13%>

14 equals

15 Notequal

26

27

2. Logic judgment is empty:

Java code:

1

2

Class = "ORG.

Apache.

Struts.

WebApp.

EXERCISE.

TestBean "/>

3

4

5

10

18

26

34

42

50

58

66

74

82

Test Type

6

Correct Value

7

Test Result

8

9

Missing Bean, No Property Attribute

11

EMPTY

12

13 EMPTY

14 Notempty

15

16

17

Not-Missing Bean, No Property Attribute

19

NOTEMPTY

20

21 EMPTY

22 Notempty

23

24

25

NULL

27

EMPTY

28

29 EMPTY

30 Notempty

31

32

33

EMPTY STRING

35

EMPTY

36

37 EMPTY

38 Notempty 39

40

41

NON-EMPTY STRING

43

NOTEMPTY

44

45 EMPTY

46 Notempty

47

48

49

EMPTY Collection

51

EMPTY

52

53 EMPTY

54 Notempty

55

56

57

NON-EMPTY Collection

59

Noteempty

60

61 EMPTY

62 Notempty

63

64

65

EMPTY MAP

67

EMPTY

68

69 EMPTY

70 Notempty 71

72

73

NON-EMPTY MAP

75

NOTEMPTY

76

77 EMPTY

78 Notempty

79

80

81

Unsupported Object

83

NOTEMPTY

84

85 EMPTY

86 Notempty

87

88

89

90

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

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