0

我正在按照此指南开始使用 IBM Social Business ToolKit: https ://www.ibmdw.net/social/getting-started-as-java-developer/

并试图列出社区(/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 文件夹中创建文件 managed-beans.xml。它应该是空的吗?如何配置它?

仅供参考:com.ibm.sbt.sample.web 对自己的 IBM Connections 安装工作就像一个魅力。

使用:

  1. sbtsdk-1.0.0.20130603-0843
  2. 预配置的 apache-tomcat-7.0.30
  3. eclipse Juno(适用于 EE 开发人员)
  4. IBM Connection 4 在自己的服务器上

更新:我写信给 ibmsbt teem 关于那个错误并且它被纠正了。所以,现在该教程中没有错误。前进!

4

1 回答 1

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 的值。

这里还有一个链接,它提供了有关 managed-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

希望这可以解决您的问题

于 2013-06-24T06:27:35.137 回答