tailieunhanh - The j2eetm tutorial - phần 10

Tạo một file WAR đơn giản gói lệnh sau đây mô tả triển khai và trang WebPageDir / vào tập tin : đóng gói webArchive myWebPageDir | 316 J2EE SDK Tools Web Application WAR File Syntax packager -webArchive -classpath servletorjspbean classes -classFiles package package content-root -contentFiles images Example Creating a Simple WAR File The following command packages the deployment descriptor and the page in WebPageDir into the file packager -webArchive myWebPageDir Example Specifying Individual Content Files Suppose that you add a file to the directory myWebPageDir later decide that you don t want the file any more and modify your .xml file accordingly. You can individually specify the content files to add by using the -contentFiles flag packager -webArchive myWebPageDir -contentFiles Without the -contentFiles option the following command will produce the same WAR file because it includes everything under the directory myWebPage-Dir packager -webArchive myWebPageDir -contentFiles Example Specifying Servlets and JSP Files Suppose that you write a servlet and compile it into your classes directory modifying the .xml file for its deployment attributes. Its class file is classes pack-age . The following command includes the servlet class file because it is under the classes directory packager -webArchive -classpath classes myWebPageDir -contentFiles . Packager 317 The following command specifies that only the package and packageB files are to be included packager -webArchive -classpath classes -classFiles package packageB myWebPageDir -contentFiles The next command adds the file back into the WAR file packager -webArchive -classpath classes -classFiles package packageB .

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.