Skip to Content

This document is based on migrating a sample application from websphere samples, which is shipped with websphere application server to SAP Web Application Server.

 A Basic calculator application was migrated to SAP application server. This sample application has EJB 2.0, Servlets and JSP as the technical components.


image


Figure 1 : Basic Calculator Sample running in Websphere Application Server

Figure 1 depicts the application running in the Websphere application server as part of the Technology Samples.

Let us see in detail how this application can be ported.

1. Take the EAR file to be migrated

2. Make note of the WEB.xml, application.xml.

3. Create an EJB Module Project and import the EAR file

4. Create a WEB Module Project and import the WAR file

5. Create an Enterprise Application project.

6. Create  another Enterprise Application project and create reference to the projects  created above. .

7.  Create an EAR from the Enterprise Application Project.

8.  Deploy the EAR and confirm a successful deployment.

9.  Logon to the administrative console and confirm deployment of modules for EJB and WEB.

10.  Check for the working of all modules.

 

          


Let’s see the steps  in detail:

    • Take the EAR file to be migrated

Dismantle the EAR file to WAR and JAR. Open the EAR file and take the necessary JAR and WAR (web applications such as JSP and Servlets).

EAR –


+– JAR (EJB, Beans and other supporting  jars)

                        |_WAR (Web contents like Servlet controllers and JSP)    

 

Check the EJB-Bean class for type if bean. Verify its Home, Remote and Bean class.

Also note its transaction type and other details. Check also the ejb-jar.xml as shown in the example

 


image

Next take the WAR file and check the web contents like JSP, Servlets. Make a note of all main elements and the web.xml.

 


image


 The above two xml files needs to be verified later, once the WAR and JAR files are imported.

 

    1. Open the Netweaver Developer Studio.

 

Create a new EJB Project Module.

FILE -> NEW -> EJB Module Project.

After creating an EJB project module, import the JAR file to this. After confirming a successful import of JAR file. Check the ejb-jar.xml and its contents.


image

 

 

 

Create a new WEB Module Project.

+ +

FILE -> NEW -> WEB Module Project.

After creating an WAR project module, import the WAR file to this. After confirming a successful import of WAR file. Check the web.xml and its contents.


image

 

 

Create a new Enterprise Application Project.

+ +

FILE -> NEW -> Enterprise  Application Project


image


 

Add the other project reference to this project, i.e. the web modules and the EJB modules.

Right click and create an Application Archive. Check the application.xml, 

 

 

 

 

Right click and deploy this EAR on the SAP application Server.


image

Logon to the SAP Application server and check for the successful deployment of the EAR and WAR module.

 


image


Figure 2 :  Administrative console

 

Once the application is deployed and no errors are found, check the application from the browser or client application.

http://<host>:port/

 

Congrats. Application is now ported!!!!

!https://weblogs.sdn.sap.com/weblogs/images/251774266/clip_image018.jpg|height=313|alt=image|width=554|src=https://weblogs.sdn.sap.com/weblogs/images/251774266/clip_image018.jpg|border=0!

 

Figure 3 : Application running in SAP WAS

 


To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

    1. Even with “//” also it should work, will confirm this and get back. I was not intersted mostly in UI since it can be migrated easily.
      (0) 
    2. Even with “//” also it should work, will confirm this and get back. I was not intersted mostly in UI since it can be migrated easily.
      (0) 
  1. Former Member
    What is the advantage of using this approach where you need to do most of it? J2EE migration KIT would even parse the application server specific files and with XSLT conversion create SAP WebAS sepcific deployment descriptors too….
    (0) 
    1. I tried to use the Kit its was not so user friendly and most of the time it generated some application.xml and web.xml, which is corrupt.I would suggest this. Also to my understanding it supports only Websphere and Weblogic, no JBoss, no IPlanet!!!
      (0) 

Leave a Reply