: Migrating Web Applications from WebSphere
3.5 to WebSphere 4.0
Application Server 4.0 is now J2EE
1.2 compliant. It's a good new because J2EE
is a standard supported by multiples application
servers vendors (BEA, SUN ...).
Web applications structure and deployment descriptor
are standardized as follows :
1 - myWebApp sample.
WEB-INF/ folder is not accessible by
end user. This folder includes all JAVA classes
(Servlets, JavaBeans...) and all libraries needed
to run the web applications. Deployment information
(Servlets parameters, URL mappings ..) are included
in web.xml. This XML file has to follow the
standardized grammar defined into "SUN's
Web application 2.2 DTD".
/ folder is the document root of the
web application, it is accessible by end user.
CSS, GIF ...) and dynamic resources (JSP).
It's not a flat structure, you could have many
folders and subfolders in.
WAR file is a JAR (like ZIP) file of
the above structure. myWebApp.WAR becomes a
standardized web application that could be easily
deployed under any J2EE 1.2+ compliant application
servers or any SERVLETS 2.2+ engines (Tomcat,
Resin, JRun ...).
With WebSphere Application Server 4.0 (WAS4)
comes a new tool : AAT (Application Assembly
Tool). It allows to create WAR files from non-standard
web applications resources through a few wizards.
show how to migrate a web application (without
from WebSphere 3.5 to 4.0 with the following
For this tutorial we use jChatBox web application
(running under WAS3.5), it's a chat solution
with JSP, JavaBeans, JARs, HTML, CSS, GIF, Applets,
TXT and XML resources.
First of all, download and unzip all files from
(1.6 MB) to a jchatbox/ folder. All JAVA classes
and JavaBeans are included into jchatbox.jar
(do not extract them yet). Most JSP, HTML, CSS,
Applets and GIF files are under skin_*/, admin/,
xml_connector/, applet/, documentation/ folders.
Configuration files (XML, TXT) are under conf/
folder. A dependant library for XML parsing
is included into xerces.jar (do not extract
1 : Launch WAS4 Application Assembly Tool
and create a new Web Module Wizard :
Step 2 : Specify Web Module properties
: Display name, File name, Description.
3 : Add JAVA classes (JavaBeans, Servlets,
...), dependant libraries, JSP and static
resources (HTML, CSS, GIF ...).
Click "Add Class Files" and
"Browse" to select jchatbox.jar.
Then select jChatBox entry in the right panel
and click "Add". All class
files will be selected (see bottom panel).
These classes will be extracted to WEB-INF/classes/
Go back to wizard 2. Click "Add Jar
Files" and "Browse"
to select jchatbox/ folder :
Then select xerces.jar in the right panel
and click "Add" (xerces.jar
will be moved to WEB-INF/lib/ folder).
Go back to wizard 2. Click "Add resources
Files" and "Browse"
to select jchatbox/ folder. Then select all
files and directories except jchatbox.jar
and xerces.jar. These files will be moved
to web application document root.
Step 4 : Optional properties.
Dot not select "Distribuable" and
5 : Web icons.
You can select some icons (16x16 or 32x32)
for the web application. They will be displayed
by the WebSphere console. It's not really
useful. Do not select any icons and click
6 : Web components.
You can define here Servlets and JSP parameters
(Name, Class, Init Parameters). However jChatBox
only uses JSP without any parameters.
7 : Role list.
You can define role list that will be used
later to protect web resources. For instance
a role could be accountant, reseller, manager,
administrator ... The users/roles mapping
is done when you install the web application
jChatBox doesn't need role. Click "Next".
8 : Servlets mapping.
You can define URI mapping for servlets. For
instance, an HelloWorld servlet accessible
from /servlet/test.HelloWorld URI could be
mapped to /helloworld URI.
jChatBox only uses JSP. Click "Next".
Step 9 : Resource references.
Defines a reference lookup name to an external
resource. This allows the web application
code to look up a resource by a 'virtual'
name that is wired to the actual location
at deployment time. jChatBox doesn't need
10 : Context parameters.
You can setup context parameters here. jChatBox
doesn't need one.
11 : Error pages.
You can define specific error pages matching
to HTTP error codes (404, 405 ...). We don't
need this feature.
12 : MIME mapping.
You can map a file extention with a mime type.
For instance Microsoft word file extension
: "doc" could be mapped to "application/msword"
mime type. Usually you don't need to add one,
the web server should be already setup for
13 : Tag librairies.
You can define Tag Librairies used in the
web application. jChatbox doesn't use taglibs.
14 : Welcome file.
Welcome file will be displayed when you try
to access document root of the web application.
(e.g. : http://www.yourserver.com/jchatbox/).
Browse the web application to select documentation/index.html
15 : EJB References.
EJB Home interfaces could be referenced to
be accessed through "java:comp/env/"
JNDI. jChatBox doesn't use EJBs.
step : Save the WAR file.
File -> Save As : jchatbox.war
Wizard 9 :
You can open jchatbox.war with WinZip to check
that the web application structure is standard.
In addition to web.xml, you should notice
two non-standard files : ibm-web-bnd.xmi
and ibm-web-ext.xmi. These XML files
are IBM WAS4-specific, they will be ignored
if you deploy your WAR file in another web
You're now ready to deploy jchatbox.war into
WebSphere Application Server 4.0.
If you want to learn more about jChatBox
(Configuration, Guides ...) then have a look
to the online