Importing a Web application archive (WAR) file migrates the WAR
file to an assembly tool.
Before you begin
This article assumes you have assembled a WAR file and want to work
with it in an
assembly
tool such as the Application Server Toolkit (AST) or Rational Web Developer.
This
article also assumes that you have started
the assembly tool and have configured
the assembly tool for work on Web and Java 2 Platform, Enterprise
Edition (J2EE) modules.
Why and when to perform this task
Importing an existing WAR file into an assembly tool migrates the
WAR file to the assembly tool so you can further configure and assemble a
deployable Web application.
Steps for this task
- Click File > Import > WAR file > Next. Alternatively,
you can right-click Dynamic Web Projects in a view such as the Project
Explorer view and click Import > WAR file. Or, on Windows platforms,
you can drag the WAR file and drop it on a view.
- In the Import dialog, define a Web project:
- Specify a WAR file name. Use Browse to locate
the WAR file and specify its full path name.
- Specify a Web project name. 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.
- Optional: Specify whether to overwrite and delete
existing resources without warning.
- Select a target server. To use an application assembly
service of WebSphere Application Server, select the WebSphere Application
Server v6.0 target server. Available assembly services include ActivitySession, Application profiling, Internationalization, and Last participant support.
- If you want to add Web components to an enterprise application
(EAR file), select Add module to an EAR project.
- Optional: Specify a new or existing enterprise application
(EAR) project to be associated with your Web project for purposes of deployment.
Select an existing enterprise application project from the drop-down
list or type a new project name. Or, click New and create a new enterprise application. Note that if you type
a new EAR project name, the EAR project is created in the default location
with the lowest compatible J2EE version based on the version of the project
being created. If you want to specify a different version or a different location
for the enterprise application, you must click New and create a new
enterprise application.
- Click Finish.
Result
A new Web project is created. Files for the Web project are shown
in the Project Explorer view under
Enterprise Applications and
Dynamic
Web Projects.