2013-06-21 47 views
0

工作,我下面這個指南開始使用IBM社交商務工具包: https://www.ibmdw.net/social/getting-started-as-java-developer/無法獲取樣本J2EE應用程序與ibmsbt在Tomcat 7服務器

,並試圖讓社區掛牌上市(/myapp.contextroot/ GetMyCommunity.jsp) 我得到的響應(應用程序/ JavaScript的):

if(typeof _sbt=='undefined' || window._sbt_bridge_compat) 
{_sbt=0; 
    if(typeof define=='undefined'){ 
     dojo.registerModulePath('sbt','http://localhost:8080/sbt/js/sdk/sbt'); 
     dojo.registerModulePath('sbt._bridge','http://localhost:8080/sbt/js/sdk/_bridges/dojo'); 
     dojo.registerModulePath('sbt.widget','http://localhost:8080/sbt/js/sdk/dojo'); 
     dojo.require('sbt._bridge.amdcompat'); 
    } 
     else { 
      dojo.registerModulePath('sbt','http://localhost:8080/sbt/js/sdk/sbt'); 
      dojo.registerModulePath('sbt/_bridge','http://localhost:8080/sbt/js/sdk/_bridges/dojo-amd'); 
      dojo.registerModulePath('sbt/widget','http://localhost:8080/sbt/js/sdk/dojo2'); 
     } 

      define('sbt/config',['sbt/ErrorTransport','sbt/Endpoint'], 
       function(ErrorTransport,Endpoint){ 
        window.sbt = {}; 
        sbt.Properties={"libraryUrl":"http:\/\/localhost:8080\/social.helloworld\/library","serviceUrl":"http:\/\/localhost:8080\/social.helloworld\/service","sbtUrl":"http:\/\/localhost:8080\/sbt\/js\/sdk"}; 
        sbt.Endpoints={ 
         'sametime':new Endpoint({"invalid":"true","transport":new ErrorTransport('sametime','Required endpoint is not available: sametime')}), 
         'domino':new Endpoint({"invalid":"true","transport":new ErrorTransport('domino','Required endpoint is not available: domino')}), 
         'smartcloud':new Endpoint({"invalid":"true","transport":new ErrorTransport('smartcloud','Required endpoint is not available: smartcloud')}), 
         'connections':new Endpoint({"invalid":"true","transport":new ErrorTransport('connections','Required endpoint is not available: connections')})}; 
        return sbt; 
       } 
       ); 
} 

看來我需要以某種方式配置JS運行。我對嗎?

指導文件中

在點#8說創造在WebContent \ WEB-INF文件夾中的文件管理-beans.xml文件。它應該是空的嗎?如何配置它?

僅供參考:com.ibm.sbt.sample.web適用於自己的IBM Connections安裝,如同魅力一樣。

使用:

  1. sbtsdk-1.0.0.20130603-0843
  2. 預先配置的Apache的Tomcat的7.0.30
  3. 蝕朱諾(對於EE開發者)
  4. IBM自己的服務器上
  5. 連接4

更新:我寫信給ibmsbt teem關於這個錯誤,它被糾正了。所以,現在教程中沒有錯誤。前進!

回答

1

我認爲問題的原因是第5點文檔中存在錯誤。庫servlet的url模式是/ library/*而不是/ *。

如果這樣不能解決問題,你能指點我GetMyCommunity.jsp的代碼嗎?這會讓我更好地瞭解問題的原因。

對於managed-beans.xml,您需要填充文件中的端點和環境配置。作爲參考,您可以參考com.ibm.sbt.sample.web應用程序使用的示例文件。轉到SDK構建中的sbtsdk \ samples \ war \ sbt.sample.web \ WEB-INF。您需要展開sbt.sample.web應用程序。請注意,「connections」端點中的變量%{connections.url}可以用您自己的連接實例的URL替換,或者您可以修改sbt.properties文件中變量connections.url的值。

而且,這裏的鏈接這給管理-beans.xml文件的詳細信息 http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Social+Business+Toolkit+SDK+documentation#action=openDocument&res_title=Connecting_to_other_systems_SDK1.0&content=pdcontent

希望這樣可以解決你的問題

+0

是的,這是在#5點的錯誤。庫servlet的url模式應該是'/ library/*'。感謝@ProjjwalSaha的回覆。 – rilaby

相關問題