The fifth study 1. Error and information processing. First define an error message and normal information in the resource file. Such as: MessageResources, defined as follows:
Java code:
1
2 #
3 # resources
FOR TESTING TAG.
4 #
5
6 Errors.
Header =
7 Errors.
FOOTER = TABLE>
Errors.
prefix =
9 Errors.
SUFFIX = td> tr>
10
11 Property1Eerror1 = Property
1,
Error
1
12 Property2error1 = Property
2,
Error
1
13 property2error2 = Property
2,
Error
2
14 Property2error3 = Property
2,
Error
3
15 Property3error1 = Property
3,
Error
1
16 Property3error2 = Property
3,
Error
2
17 globalerror = Global
Error
18
19 #
20 # resources
For testing tag.
twenty one #
twenty two
.
Header =
24 messages.
FOOTER = TABLE>
25
26 Property1Message1 = Property
1, Message
1
27 Property2Message1 = Property
2, Message
1
28 Property2Message2 = Property
2, Message
2
29 Property2Message3 = Property
2, Message
3
30 Property3Message1 = Property
3, Message
1
31 Property3Message2 = Property
3, Message
2
32 GlobalMessage = Global Message
33
Define errors and information classes in the program, this example is written in JSP