Importing WAR files

Your can import a web application (.war) archive (WAR) file and define a new EAR project and Web module for the WAR file using the Assembly Toolkit.

  1. Start the Assembly Toolkit.

  2. Click File > Import.Alternatively, you can right-click Web Modules in a view such as the J2EE Hierarchy view and click Import. Or, on Windows platforms, you can drag the WAR file and drop it on a view.

  3. In the Import dialog, specify a WAR file and a Web project name...

    1. Click WAR file > Next.

    2. Specify a WAR file. Use Browse to locate the WAR file and specify its full path name.

    3. Specify a Web project. For example, if you are importing the HelloWorld.war file, you might name the project HelloWorld. Click New and specify HelloWorld for the project name.

    4. (Optional)   To add the WAR file and Web project to an enterprise application, enable Configure advanced options and click Next. On the J2EE Settings page, specify the EAR project, the context root (Web project), and the J2EE 1.2 or 1.3 specification to use for the Web module. The J2EE 1.3 specification (the default) includes the Servlet 2.3 specification and the JSP 1.2 specification; applications developed for the J2EE 1.3 specification typically target a WAS v5.x server. Then, click Next.On the Features page, specify a feature for the Web project. For example, enable Default synchronization policy for CVS repository to have a .cvsignore file generated for the WEB-INF/classes directory. Then, click Next or Finish.

    5. Click Finish.

  4. Verify the contents of the new Web module in either of the following ways...

    • In the J2EE Hierarchy view, expand Web Modules and view the new module.

    • Click Window > Show View > Navigator to see the associated files for the Web module in a Navigator view.

 

See Also

Assembling Webapplications
Assembling applications with the Assembly Toolkit