Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Upgrade and Migration Guide

- Previous: Migrating Servlets
- Next: Migrating Enterprise EJB Modules

## Migrating Web Application Modules

Migrating applications from Application Server 6.x to Sun Java System Application Server 8.1 does not require any changes to the Java code or Java Server Pages. However, you must change the following files:

- `web.xml`

- `ias-web.xml`

The Application Server adheres to J2EE 1.4 standards, according to which, the `web.xml` file inside a WAR file must comply with the revised DTD at `http://java.sun.com/dtd/web-app_2_3.dtd`. This DTD is a superset of the previous versions’ DTD, hence only the `<! DOCTYPE` definition needs to be changed inside the `web.xml` file, which is to be migrated. The modified `<! DOCTYPE` declaration looks like:

    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//
                            DTD Web Application 2.3//EN"
                            "http://java.sun.com/dtd/web-app_2_3.dtd">

In Application Server Platform Edition 8.1, the name of this file is changed to `sun-web.xml`.

This XML file must declare the Application Server-specific properties and resources that are required by the Web application.

See Potential Servlets and JSP Migration Problems for information about important inclusions to this file.

If the `ias-web.xml` of the Application Server 6.5 application is present and does declare Application Server 6.5 specific properties, then this file needs to be migrated to Application Server standards. The DTD file name has to be changed to `sun-web.xml`. For more details, see URL `http://wwws.sun.com/software/dtd/appserver/sun-web-app_2_4-1.dtd`

Once you have made these changes to the `web.xml` and `ias-web.xml` files, the Web application (WAR file) can be deployed from the Application Server’s deploytool GUI interface or from the command line utility `asadmin`. The deployment command must specific the type of application as web.

Invoke the `asadmin` command line utility by running `asadmin.bat` file or the `asadmin.sh` script in the Application Server’s `bin` directory.

The command at the `asadmin` prompt is:

    asadmin deploy -u username -w password
    -H hostname
    -p adminport
    --type web
    [--contextroot contextroot]
    [--force=true]
    [--name component-name]
    [--upload=true] filepath

- Previous: Migrating Servlets
- Next: Migrating Enterprise EJB Modules

- © 2010, Oracle Corporation and/or its affiliates