PreviousTOCNext Start of Help

Preparing the Application for Migration

You need to complete these steps only if you intend to migrate an entire application.

The Migration Tool accepts one of the following as input:

Required Setup

If you specify an archive as input, the Migration Tool will migrate the deployment descriptors (DDs) and source files, if any are present. Source files are not usually packaged in the archive so, in most cases, only DDs are migrated, and the tool just copies unchanged class files to the output directory. In this scenario, you do not have to do any additional preparation for the application archive.

If you specify a source directory as input, the Migration Tool requires the application to conform to the J2EE application directory structure as described in the J2EE specification. Follow these steps to prepare your application, if it is not already in the correct structure:

  1. In a new directory, issue the jar -xvf command to extract the EAR file and all the containing JAR and/or WAR files of the deployed application. This makes the server-specific DDs available to the Migration Tool.
  2. Copy the source files that correspond to the class files into the proper directories created in step 1. Do this in such a way that all of the Java files that correspond to the relevant class files reside in the same directory. When both source and class files are present, the Migration Tool will migrate just the source files.
  3. Provide the directory that contains the application as input to the Migration Tool. This is the directory that was created in step 1.

Optional Setup

Migrating Server Configuration Parameters

If you want to migrate selected parameters from the server configuration files, copy the relevant files from the source application server to the directory that will be provided as input to the Migration Tool. These files include:

Migrating a Web Application from Sun ONE Web Server 6.0

If, after migration, a Web application needs to have the same context root on the Application Server as it had on the Sun ONE Web Server 6.0, then either one of these configuration files web-apps.xml, rules.properties or servlets.properties is required as input along with the Web application. The configuration file needs to be copied into the directory specified as input to the Migration Tool.

The context root is first looked up inside the web-apps.xml file. For the context root to be picked up correctly, the input directory should be the same as that mentioned in the web-apps.xml file (that is, the input directory should be the directory in which the WAR file is extracted by Sun ONE Web Server 6.0).

If the web-apps.xml file is not present in the input, the Migration Tool looks up the rules.properties file and, if that file is not found, looks up the servlets.properties file. The rules.properties and servlets.properties files are searched with respect to the servlet-name of the first servlet found inside the web.xml file of the Web application.



Start of Help

Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.