< Previous

Lesson 4: Test the application

About this task

In this lesson, you test the application that you developed in the proceeding lessons. You ensure that you have an application server instance that is set up to run the application, run the application on the server, and submit test values for temperature conversion.

Checking servers view for the application server

About this task

In this section, you ensure that you have a WebSphere Application Server v8.5 instance that is set up to run the OSGi application.

Procedure

  1. Click the Servers tab to access the servers view.
  2. Check that you have a WebSphere Application Server v8.5 server. If you do not have a server, right-click in the Servers view and select New > Server. Choose WebSphere Application Server v8.5 from the list and follow the rest of the steps of the wizard.
  3. Check that the server is running. If the server is running, the status information next to the server says Started. If it is not running, to start it, right-click the server and select Start.

Running the application on the server

About this task

In this section, you run the application and submit test values.

Procedure

  1. Launch the application through the index.html file. In the web project, right-click the index.html file that you created and select Run As > Run on Server. Choose the WebSphere Application Server v8.5 server from the server list and click Finish. The application is deployed to the server and the deployed index.html file opens in the embedded browser.
  2. In the field on the page, enter a temperature value that you want to convert.
    Web form
  3. Click Submit. The value is converted. The processing is handled by the EJBConverter EJB that is available as an OSGi service.
    Temperature conversion response
< Previous
Icon that indicates the type of topic Tutorial lesson topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: osgi_ejb_4.html