Lesson 5: Deploy the OSGi Counter application
Follow these steps to deploy the application to a WebSphere® Application Server installation that has the OSGi feature pack installed. Refer to the WebSphere Application Server documentation for installation and configuration details.
About this task
Procedure
- In Enterprise Explorer, expand .
- Right click CounterServlet and select . The Run On Server dialog opens.
- Click Finish.
Results
The web browser opens and the string counter=0 is displayed. Each time the page is reloaded the value increments.
Switch to the Console view (
) to view the output from the server. A successful outcome displays the message
CounterImpl.init() called based on the initialization method entry for the
CounterImpl bean in the blueprint
file:[3/30/10 15:30:58:546 EDT] 0000004c StepStartBLA A CWWMH0300I: Starting business-level application "WebSphere:blaname=CounterApp".
[3/30/10 15:30:59:187 EDT] 0000004c webapp I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: CounterWebBundle.
[3/30/10 15:30:59:265 EDT] 0000004c WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_hostCounterWebBundle
[3/30/10 15:30:59:281 EDT] 0000004c webcontainer I com.ibm.ws.wswebcontainer.VirtualHost addWebApplication SRVE0250I: Web Module CounterWebBundle has been bound to default_host[*:9083,*:80,*:9446,*:5067,*:5066,*:443].
[3/30/10 15:30:59:296 EDT] 0000004c FileLocatorIm E CWPST0164E: The CounterWebBundle composition unit is not found.
[3/30/10 15:30:59:312 EDT] 0000004c StepStartBLA A CWWMH0196I: Business-level application "WebSphere:blaname=CounterApp" was started successfully.
[3/30/10 15:30:59:312 EDT] 00000016 SystemOut O CounterImpl.init() called
Note: If
the output from the CounterImpl.init() is not displayed in the console output,
check the output for error messages during deployment or startup of the application and then
check the blueprint files for possible errors in the bean and service definitions.
Lesson checkpoint
You deployed the application to WebSphere Application Server.
In this lesson, you learned how to run your application
on a server.