tailieunhanh - Seam Framework Experience the Evolution of Java EE 2nd phần 10

Để tùy chỉnh dự án cho các ứng dụng của bạn, hãy làm theo các bước sau: • Thêm các thành phần Seam và các lớp khác trong thư mục src. • Thêm các trang web, hình ảnh, và các tài nguyên web khác trong thư mục xem. • Chỉnh sửa các Ví dụ hội nhập là nơi tốt nhất bắt đầu cho một ứng dụng web dựa trên EJB3 Seam. | 428 Simpo PDF Merge and SplifUnregisteretfVersion -Ihttp Simple EJB3-Based Web Applications The integration example is the best starting place for an EJB3-based Seam web application. This is the directory structure of the source project mywebapp src Java Source files View web pages .xhtml CSS and images resources WEB-INF MetA-INF lib App specific lib JARs test Java source for test cases nbproject NetBeans integration and support To customize the project for your application follow these steps Add Seam components and other classes in the src directory. Add web pages images and other web resources in the view directory. Edit the to include any third-party library files required for your application through either the war or ear task. For instance you can include the Ajax4jsf JARs as we did in Chapter 20. Change the resources WEB-INF file to define the navigation rules . the pageflow in the new application. Edit the resources WEB-INF file to include page parameters for RESTful pages see Chapter 15 page actions and stateful navigation rules see Section . Change the resources META-INF file to specify custom persistence options for the new application if any see Chapter 28 for some examples . Change the application name as follows From the Library of sam kaplan Simpo PDF Merge andZÍS pYitUn regfSWey VerS iOrr-WtpV Change the project name integration in the file to your own project name . mywebapp . Change the resources META-INF file to reflect your application s context root URL. Change the class loader name in resources META-INF to a unique name that fits your application. Change the JNDI name pattern in the resources WEB-INF file to match .