Migrating the HelloWorld Application from Tomcat Web Server 4.1.12 to
Sun Java System Application Server 8
Version 1.0
This document explains how to use the Migration Tool for Sun Java System
Application Server 8 (hereafter called the Migration Tool) to migrate the
HelloWorld application from the Tomcat Web Server 4.1.12 source server to the Sun Java
System Application Server 8 target server. The document also explains
how to assemble, deploy, and run the sample application on the target
server.
This document contains the following sections:
Overview
Migrating the Application
Deploying and Running the Migrated
Application on the Target Server
Overview
HelloWorld Overview briefly
describes the HelloWorld sample application.
Migrating the Application
This section describes how to migrate the application from the source
server (Tomcat Web Server 4.1.12) to the target server (Sun Java
Systems Application Server 8).
- Set the following environment variables that are used by the Migration
Tool's build scripts:
- JAVA_HOME: J2SE SDK 1.4 installation directory
- J2EE_HOME: Sun Java Systems Application Server 8 installation
directory
- ASMT_HOME: Migration Tool installation directory
- AS_HOME: bin directory of the Sun Java Systems
Application Server 8 installation
- CLASSPATH: Include any application-specific library
classes that are required for compiling the application
- Start the Migration Tool in GUI mode:
On Solaris:
<ASMT_HOME>/bin> sh asmigrate.sh -u
On Windows:
<ASMT_HOME>\bin> asmigrate -u
Invoking the Migration Tool in Command-Line
Mode explains how to run the Migration Tool in command-line mode.
- Specify the Source Application (Input) details:
- Select "Source" and specify the directory
<ASMT_HOME>/examples/tomcat_4_1_12/helloworld
as input to the Migration Tool.
- Select the Source Server as TomCat Web Server 4.1
from the dropdown list.
- Specify the Target Application (Output) details:
- Specify a Directory path of your choice to the location where the
migrated output application should be written. From here on, this document
will refer to this directory path as
<OUTPUT_DIR>.
- Select the Target Server from the dropdown list. Your only choice is
Sun Java Systems Application Server 8.
- Press the Migrate button.
The Migration Tool creates a directory structure that contains the migrated
source files and generated build scripts in the output directory that you
selected.
- Change to the <OUTPUT_DIR>/helloworld/src directory
and run the appropriate build script to generate the
helloworld.war file:
- On Solaris: sh build_war.sh
- On Windows: build_war
The build script generates the
<OUTPUT_DIR>/helloworld/src/asmtbuild/helloworld.war
file.
Deploying and Running the Migrated Application on the Target Server
- Make sure that you have set the environment
variables.
- Start the Application Server.
- Deploy helloworld.war, the migrated application.
- Change to the bin directory in the Application Server and run
the following asadmin command:
asadmin deploy --user username --password password
--host hostname --port adminport --type web
<OUTPUT_DIR>/helloworld/src/asmtbuild/helloworld.war
Replace the variables shown in a blue font with
values appropriate for your own environment.
- Run the deployed HelloWorld application by accessing the following URL:
http://localhost:<port>/helloworld
Index
Copyright (c) 2004
Sun Microsystems, Inc. All rights reserved.