tailieunhanh - Apress Pro Apache Struts with Ajax phần 7

bạn có thể cần phải bao gồm các nội dung tĩnh như là một phần của tập tin được tự động tạo ra. Ví dụ, một nhóm phát triển XDoclet sử dụng có thể cần để cấu hình một servlet chứa trong một tập tin jar (ví dụ, ActionServlet Struts). Đây là nơi mà bước 4 đến chơi. XDoclet cho phép các nhóm phát triển | 296 CHAPTER 8 SPEEDING STRUTS DEVELOPMENT WITH XDOCLET then begin generating either deployment descriptors configuration files or source code based on the XDoclets embedded in the application s source code. Let s not forget though that XDoclet is a code generator. Oftentimes when writing up a configuration file like a file you might need to include static content as part of the file being dynamically generated. For instance a development team using XDoclet might need to configure a servlet contained within a jar file for example the Struts ActionServlet . This is where step 4 comes into play. XDoclet allows the development team to define static pieces of a configuration file in what is called a merge point. As an XDoclet Ant Task parses an application s source file it will try to locate any merge-point files the actual merge files are different for each XDoclet Ant Task and merge the content of these files with the content dynamically generated from the XDoclet tags inside the Java source code. Another use for merge-point files is where you do not want to write Java code for something simple like setting up a default action in Struts but you need to make sure that the information is added to the configuration file. For instance you might want to send users to a JSP page if they try to go to a URL not available in an application. You are not going to write a Struts Action class just for this. Instead you could place the following action definition in a merge-point file called action path foo unknown true forward WEB-INF The combination of static and dynamic text results in the output of a Java source file configuration file or deployment descriptor. Note Remember that XDoclet does not just generate configuration files. Several XDoclet tags for example ejbdoclet. actually generate source code. There are even instances where that generated source code can include source from a merge-point file. If the output is Java source code the .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
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.