Mail/Login: Password : forgot my password!

Uniface 9.x Server pages on IBM Websphere

Direct link
Written by -GHAN- // Tags: websphere uniface tomcat

By now I used to work with Apache Tomcat while getting a Uniface website up and running. But lately there was a new request. Uniface should be served by IBM Websphere. As you know, the help within your Uniface IDF says, that this is possible and tells you how to do on an iSeries machine. In my case the server was a Windows based system. In this contribution I will report on how I managed to get this up with some help of Compuware.

1 Installing a Websphere

Using Websphere for Uniface feels like taking a supertanker to get the mail into a postbox! The overhead seems gigantic. But on the other hand, if somebody already has this running, then why install another software!? Well, I didn't have it installed and I had to find out, how this works. *doh*

1.1 Installing the main software

The main package I downloaded had more than 800MB in store ( and required about 1.1GB on the Storage. The Installation itself was slow but not that complicated.

1.2 Install the updater

In addition I needed to update this version to version This is not only done by installing an update, but to do so, you will need to install an updater :) ... and so I downloaded that with a payload of 114MB (requires about 350MB storage).

1.3 update to a usefull version

After finishing this, you should download the update pack for this version. The pack for the above version was 650MB. Having this on my harddisk, the updater could do its job.

launch the Profile Management Tool
launch the Profile Management Tool

1.4 Configuring a server profile

Websphere manages its servers in profiles. We need to create a server profile with the Profile management Tool (see the picture). Launch the programm and choose "create" on the right side of the window.
We need to create an Application Server and will take the extendet profile creation setting (Note: The name could differ, as my version was german). Hit the "NEXT" button until you reach the window "Node and Hostname". In my tests, Websphere compained about the host name due to the underscores ("_"). But they got there because the installer created the name :) Nice trap there, IBM! In order to continue, we will change the underscores to minus ("_" => "-"). After having done that, the installer will let us pass.

Next Todo is to define an admin account. Choose whatever you desire and dont forget to write it down.

define an admin and password
define an admin and password

Then we head on and confirm the settings for security certificates part 1 and part 2, Port settings and Service definition with "NEXT". Again: The names could differ as my version was in puny german, and sometimes mixed with english stuff ;D Asstouning, what JAVA is capable of, hehe.
Finally we press the "finish" button and are done with it. Now the profile should be listed in the overview window, where we started before.

2 Preparing a WAR file

A Websphere configuration will perhaps need some preparations in your setup! As all my assets (lets say external javascript files, gfx files, css files and static html) are not embedded in Uniface, I have to reposition my declarations within the HTML files.
The reason for that is the parameter "CONTEXT ROOT" within Websphere. I didn't manage to just let this be "/" as I wished I could have done. So I considered, I would like to point my document root to "/ahp-portal". This is, what I will use later in my setup within the Websphere server.

As I only have one HTML file to describe the format for all HTML ouput (the master_container.htm) changing this is done pretty fast. Further I had to check all the graphic definitions within my CSS files, as they have a absolute path from the document root. The same goes to the JavaScript which dynamicaly will load a static template from the assets.

So my former URL and paths did look like:
Sorry- ... please log-in or register to get this!

After including the Websphere CONTEXT ROOT, the paths change like:
Sorry- ... please log-in or register to get this!

After having configured those things in the right way, we build a WAR file.

2.1 JAR to WAR

In order to build a .WAR file you'll need the JAR executeable. Usually this is shipped with the JDK (Java Development Kit). But sometimes you can be lucky and some other applications on your PC have it already. This made me search for the JAR executeable across my entire disk. And I was lucky to find it in the Oracle path :)

hint: If you have installed the Oracle client on your system, then you could find the JAR executeable there!

If you need a closer look on the executeable itself, you could find the infos here.
What we need to do, is to run the command promt and switch over to the directory, where we have the Uniface applet installed. Usually this looks like:


Type the following command to create the .WAR file :
command line to create the .war SOURCE CODE
Sorry- ... please log-in or register to get this!

The name "ahp_portal.war" can be changed to whatever you like. Keep in mind, that the name should make sense for those, who maybe not know its content.
The file is technically a .ZIP file. You can open it with any programm capable of handling this format. It you would open it with winzip then it certainly would look like:
The .war file opened in Winzip
The .war file opened in Winzip

And thats nearly all we need. But before we finish this task, we need to modify the file web.xml in the archive. This one has to match to the target system. You'll find the file in the folder "Web-inf".
servlet config in web.xml SOURCE CODE
Sorry- ... please log-in or register to get this!

Change the settings here to fit your configuration. If you need more information on how to set it up, let me know. I've been through a lot of crap here ;)

Finished with that? Fine, then take the modified web.xml back tot the folder Web-inf and replace the old one.

For those of you, who handle the gfx with uniface (glyphs and images) this could be it, I guess. And for renegades like me, who need a bit more, well ... we need to add a bit into that archieve.
As all my assets are placed in a folder called "ahp-portal-assets" I simply dragged this folder into the root of the archieve.

log in to Websphere console
log in to Websphere console

3 Deploying the Uniface WAR file

Log in to the Integrated Solution Control with your browser and the prior defined admin account. You will find the link in the start menu.
Click on "Applications" and choose "New Application". Select "New Enterprise Application" and use the file finder to choose the .WAR file we have been made (in my example: ahp-portal.war).

After that you can press "NEXT" until you reach "Step 4: Map context roots for web modules".
In the field "Context Root" you will have to fill in the path that you have configured in your assets. For me and my setup this was "/ahp-portal".
Confirm this window by pressing "NEXT" and after that "FINISH". The server will now generate a configuration.

Somewhere below there is a link "Save directly to the master configuration". Click it!

Now we need to start-up the application. This is done by choosing the menuitem "Applications". The window will show several application types. We need to pick the "Websphere Enterprise applications". A new list shows up showing our .WAR file. In the same line there will be a red X stating that the application isnt started. Check that line and choose "Start" in the top of the page. Now the application should be started.

Let's find out, where we can connect to Uniface

Again we head to left menu and choose: "Server" -> "Server Types" -> "Websphere application servers".

Our server (server1 in my example) should be visible. A click on the server1 opens a new window. Somewhere on the right side of the page, you'll find a link called "PORTS". If you click on it, all used ports will get listed. What we need to look for is the entry "WC_defaulthost". Commonly this will be port 9080.
Knowing this makes our URL as follows:
URL to Uniface via Websphere SOURCE CODE
Sorry- ... please log-in or register to get this!

Change the server name to whatever name your server has. The same is to do with the componentname. Replace it with the name of your serverpage. Now you can connect to Uniface :)

Conclusion and thanks

Websphere is a heavy-weight supertanker in comparision to the Apache Tomcat. But it is possible to use it if the IT environment demands it. Many caveats have to be mastered and I hope, I covered the most of them. Maybe this will help you to digg through Websphere and Uniface.
The key element is the setup to your assets and its Setup within the Websphere server. As all your assets are deposited in a .WAR file, you certainly have to reconfigure some paths. All in all this surely works well.

This Websphere stuff has been a hell of a mess for me. And yet I made it. So I qould like to thank Andreas for his effords to get information and Guy for the nice talk and his documentation on Websphere with Uniface. Without those two I surely would have deleted Websphere pretty fast. Further I need to thank AO for his trust in me regarding this! Together we made it ... and so can you!

Good luck to you all. I will help out with this if I can :) If you liked this, then hit the "LIKE" button for Facebook and help me spread my message! This is pretty appreciated.


on 2011-03-14 16:07:20 -GHAN- wrote:

Do it, Rafa :)

on 2011-03-14 15:46:46 uniface8 wrote:

Great!!! I´ll try to do and i´ll tell you my experience. Rafa.

3235 view(s) / 2011-03-14 07:36:10 / LAST UPDATED: 2011-07-13 16:12:24