tailieunhanh - Practical Apache Struts2 Web 2.0 Projects retail phần 5

Cơ sở hạ tầng phát triển cũng nên được đặt đúng chỗ. Từ Chương 2, các thư viện cho Struts2 đã được tải về và cài đặt trong kho lưu trữ Maven2 địa phương của bạn. Trong chương này, bạn đã cài đặt một máy chủ cơ sở dữ liệu và thực hiện đơn vị xét nghiệm để kiểm tra sự tồn tại của mô hình. | 124 CHAPTER 5 DATA MANIPULATION Internationalized Text Resources Before getting to the specific JSP changes you need to know where the internationalized text comes from. The short answer is a Java properties file with the name and package directory location being the same as that of the action class that is using it. Practically this solution leads to a lot of duplication so a multitiered search was developed so that properties can be placed in a number of different files in different locations . Here are the steps and each is performed until a value for the key being searched on is found 1. A file with the same name and in the same package directory as the action class is searched for that is com fdar apress s2 actions user . 2. The class hierarchy is searched using the same name mapping from the class name and package directory as earlier all the way back to Object that is com fdar apress s2 actions user com opensymphony xwork2 and java lang . 3. Every implemented interface using the same name mapping from the class name and package directory as earlier and subinterface is searched. 4. If the action is model driven a properties file for the model class using the model name class hierarchy and interfaces as in steps 1 2 and 3 is searched for. 5. The file is searched for in the action class s directory and every parent directory up to the class root directory. 6. The global resource property file is searched specified using the . configuration property . rip In most applications the number of property files is limited. This reduces the number of locations that a developer needs to look when searching for a key s value to change and reduces the number of files that need to be converted into each supported language. The name of the properties file also varies. For the action class FindUserAction the properties file .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.