You can use rapid deployment tools to:
For example, you can place fully composed enterprise applications (EAR files), application modules (WAR files, EJB JAR files), or application artifacts (Java source files, Java class files, images, XML, or HTML) into a configurable location on your file system, referred to as the monitored directory. The rapid deployment tool automatically detects added or changed parts of these J2EE artifacts and performs the necessary steps to produce a running application on the server.
There are two ways to configure the monitored directory, each performing separate and distinct tasks. You can either specify the monitored directory as a free-form project or as an automatic installation project.
The rapid deployment tools free you from understanding J2EE application structure, as well as having to update and modify basic deployment descriptor information, such as new servlet or EJB entries. Using the free-form approach, you can place in a single project directory the individual parts of your application, such as Java source files that represent servlets or enterprise beans, static resources, XML files and other supported application artifacts. The rapid deployment tools then use your artifacts dropped in this free-form project directory to automatically place them in the appropriate J2EE project structure, generate any additional required artifacts to construct a J2EE compliant application and deploy that application on a target server.
Example
Assume that you want to set up a simple Web application on a server using the free-form approach. You have created the Java source files that implement a group of servlets. In addition, you have created the JSP files, images, and static HTML files to define the application. Using the free-form approach, you simply place all these files together, or one at a time, in the free-form project directory. As J2EE artifacts are placed inside this free-form project, the rapid deployment tools dynamically generate the necessary J2EE project structure and deployment descriptors. For example, the deployment descriptor includes Web deployment descriptor (web.xml). The J2EE project structure includes an enterprise application project, a Web module project, an EJB module project, an EJB client JAR project, and a utility Java project.
The rapid deployment tools detect additions or changes to J2EE artifacts in the free-form project and run a build. As you drop files into the free-form project, the necessary J2EE projects are created, if these projects do not exist. For example, if you drop a servlet source file, a Web project and an Application project is created if these projects do not exist in your workspace. Then the rapid deployment tool maps the artifacts to their correct location in the appropriate project. In this case, the servlet source file is compiled and its compiled class files are copied to MyProjectWeb\WebContent\WEB-INF\classes. The rapid deployment tools then generate or update any additional required deployment artifacts. In this case, the web.xml for the Web project is updated to include a servlet and servlet mapping entry.
The rapid deployment publishes the updated application on the server. If you choose to use the optional earExportPath option that specifies the directory location of the output EAR file, an EAR file is created. If the target server is remote, it generates an EAR file and transfers the EAR to the remote server.
Benefits
The benefits of using the free-form approach are that you can focus on the structure of your application independent of the requirements of J2EE or other standards. One of the complexities of J2EE development is that it defines the location of artifacts in an application relative to one another. For example, in a Web application, class files must be placed in WEB-INF/classes and JSP files must be placed outside of the WEB-INF folder. This structural requirement must be understood and followed during development in order for the application to operate correctly. The rapid deployment tools remove this structural requirement, allowing the source project to follow your development defined structure and freeing you from having to understand the J2EE defined structures.
Automatic installation project
The rapid deployment tools simplify the process of installing, modifying, and uninstalling applications on a server. Automatic installation relies on a single project directory that listens for J2EE compliant applications (EAR files) or modules (WAR, JAR, or RAR files). The rapid deployment tools then deploy the artifacts to the target server.
If you place EAR files in the automatic installation project, the EAR file is automatically deployed to the server. If you delete EAR files from project, the application is uninstalled from the server. If you place a new copy of the same EAR file in the automatic installation project, then the application is reinstalled. If you place WAR or EJB JAR files in the automatic application installation project, the rapid deployment tool generates the necessary EAR wrapper and then publishes that EAR file on the server. For RAR files, a wrapper is not created. The standalone RAR files are published to the server.
Benefits
The benefit of using the automatic installation project is that it frees you from the complexity of administering your application. For example, using wsadmin scripting program or the administrative console to install the application through a multiple-step wizard.