OSGi 計算機

此範例示範如何使用 OSGi 軟體組中的 Maven。此 OSGi 應用程式由一個 OSGi Web 軟體組所組成,而該軟體組包含的一個 Servlet 會存取其他軟體組所提供的服務。提供服務(加法、乘法)的軟體組專案是轉換成 OSGi 的 Maven 專案。此應用程式在 WebSphere® Application Server 上執行。此範例介紹如何使用 OSGi 開發工具。

如果要使用此範例,您必須安裝並配置 WebSphere Application Server 8.0 版或更新版本。 如果要驗證有可用的伺服器執行時期環境,請按一下視窗 > 喜好設定,展開伺服器,然後按一下執行時期環境。您可以使用這個窗格來新增、移除或編輯已安裝的伺服器執行時期定義。 您還可以下載並安裝新伺服器的支援。
如果要部署範例,請執行下列動作:
  1. 匯入範例。
  2. 在「企業瀏覽器」視圖中,展開 org.sample.calculator.web > org.sample.calculator.web > Servlets。
  3. 用滑鼠右鍵按一下 org.sample.calculator.web.CalculatorServlet,然後選取在伺服器中執行。
  4. 選取 WebSphere Application Server 8.0 版或更新版本。
Icon that indicates the type of topic Sample topic
Timestamp icon Last updated: last_date

File name: calculatorExample.html