2013/8/2 Vyacheslav Muhtarjants <[email protected]>

> Hi, Henry.
>
> I have found a place where I could change Shindig host name and its port.
> I have changed two lines in web.xml file under WEB-INFO folder.
>
> <![CDATA[
>>         shindig.host=localhost
>>         shindig.port=80
>>         aKey=/shindig/gadgets/proxy?container=default&url=
>>      ]]>
>
>
> However, I get the following javascript error message
>
> 'Uncaught ReferenceError: gadgets is not defined'
>
> on
>
> GET
> http://localhost/gadgets/js/core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0
>
>
> I suppose that the main Shindig configuration file is web.xml. I have
> attached it here. Could you please advise which changes I have to make in
> that file to configure it for the domain shindig.blueg.com? I think it is
> shindig.properties you mentioned in the last email.
> ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas:1<http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas>
>
>
> 2013/7/30 Henry Saputra <[email protected]>
>
>> You can try running the Shindig server with additional Java VM argument:
>> -Dshindig.host
>> So it would be something like: -Dshindig.host="MY_SITE"
>>
>> While we are at it you need to be able to override the shindig
>> configuration files which are basically consist of 2 parts:
>> 1. shindig.properties which is the server related configuration
>> 2. container.js which allow Shindig server to server more than one
>> "container" based on the name.
>>
>> First step, overriding access to shindig.properties to your custom
>> shindig.properties. I think Rave have more elegant solution for this but
>> since the core Apache Shindig relying on accessing shindig.properties as
>> Java resource, we need to put your custom shindig.properties in the path
>> that is earlier than the shindig's ROOT war.
>> I think in Tomcat you can put it in the <TOMCAT_ROOT>/conf directory.
>> However, remember that you need to copy paste all the shindig.properties
>> file because essentially you are "overriding" the default properties file.
>>
>> One of the key value of in the shindig.properties you need to change is
>> the
>> "shindig.containers.default" property. The default value
>> is: shindig.containers.default=res://containers/default/container.js
>> The prefix "res://" indicates that the path should be treated as Java
>> resource. It is actually comma separated value so you can actually add
>> your
>> own custom container config file.
>> However, for simplicity lets just override that so you the code can access
>> default container which will be your new container.js file. You can put
>> your container file as file:// or http:// protocol.
>> The container.js file contains JSON based configuration that could and
>> should be overriden to make Shindig work, for
>> example gadgets.securityTokenType if you need to make it secure and lock
>> domain.
>>
>> Hope this helps to give you guide to right direction. Feel free to ask
>> more
>> if you need help.
>>
>>
>> - Henry
>>
>>
>>
>>
>>
>>
>> On Mon, Jul 29, 2013 at 3:59 AM, Vyacheslav Muhtarjants <
>> [email protected]> wrote:
>>
>> > Hi, Henry.
>> >
>> > I think I am getting a little advancement with this.
>> >
>> > On requesting a gadgets page
>> >
>> >
>> http://MY_SITE/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas
>> > I
>> > get a blank page with several jasvascript errors 'Uncaught
>> ReferenceError:
>> > gadgets is not defined '. However, the source code of the page contains
>> > rendered contents of the gadgets, which is hidden (display: none)
>> though.
>> > Nevertheless, direct access to the same page through Tomcat returns
>> > rendered gadget but with a javascript error
>> > '
>> >
>> >    1. No relay set (used as window.postMessage targetOrigin), cannot
>> send
>> >    cross-domain message
>> >
>> >
>>  
>> core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0:4<
>> >
>> http://localhost:8080/gadgets/js/core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0
>> > >
>> >       1. d
>> >
>> >
>> core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0:4<
>> >
>> http://localhost:8080/gadgets/js/core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0
>> > >
>> >       2. gadgets.error
>> >
>> >
>> core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0:4<
>> >
>> http://localhost:8080/gadgets/js/core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0
>> > >
>> >       3. call
>> >
>> >
>> core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0:72<
>> >
>> http://localhost:8080/gadgets/js/core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0
>> > >
>> >       4. call
>> >
>> >
>> core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0:103<
>> >
>> http://localhost:8080/gadgets/js/core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0
>> > >
>> >       5. gadgets.window.adjustHeight
>> >
>> >
>> views:dynamic-height:setprefs:core!core:rpc.js?container=default&nocache=0&debug=0&c=0&v=a6aad0d2163b9a080f849c1cf6f1150b&jsload=0:12<
>> >
>> http://localhost:8080/gadgets/js/views:dynamic-height:setprefs:core!core:rpc.js?container=default&nocache=0&debug=0&c=0&v=a6aad0d2163b9a080f849c1cf6f1150b&jsload=0
>> > >
>> >       6. adjust_height
>> >       todo_14.js?container=default&refresh=3600&url=http%3A%2F%
>> > 2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js:114<
>> >
>> http://localhost:8080/gadgets/proxy/todo_14.js?container=default&refresh=3600&url=http%3A%2F%2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js
>> > >
>> >       7. load_gui
>> >       todo_14.js?container=default&refresh=3600&url=http%3A%2F%
>> > 2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js:1865<
>> >
>> http://localhost:8080/gadgets/proxy/todo_14.js?container=default&refresh=3600&url=http%3A%2F%2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js
>> > >
>> >       8. display_todos
>> >       todo_14.js?container=default&refresh=3600&url=http%3A%2F%
>> > 2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js:1564<
>> >
>> http://localhost:8080/gadgets/proxy/todo_14.js?container=default&refresh=3600&url=http%3A%2F%2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js
>> > >
>> >       9. fill_todos_from_prefs
>> >       todo_14.js?container=default&refresh=3600&url=http%3A%2F%
>> > 2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js:191<
>> >
>> http://localhost:8080/gadgets/proxy/todo_14.js?container=default&refresh=3600&url=http%3A%2F%2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js
>> > >
>> >       10. load_todos
>> >       todo_14.js?container=default&refresh=3600&url=http%3A%2F%
>> > 2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js:155<
>> >
>> http://localhost:8080/gadgets/proxy/todo_14.js?container=default&refresh=3600&url=http%3A%2F%2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js
>> > >
>> >       11. init
>> >       todo_14.js?container=default&refresh=3600&url=http%3A%2F%
>> > 2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js:106<
>> >
>> http://localhost:8080/gadgets/proxy/todo_14.js?container=default&refresh=3600&url=http%3A%2F%2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js
>> > >
>> >       12. deploy
>> >       todo_14.js?container=default&refresh=3600&url=http%3A%2F%
>> > 2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js:1979<
>> >
>> http://localhost:8080/gadgets/proxy/todo_14.js?container=default&refresh=3600&url=http%3A%2F%2Fwww.labpixies.com%2Fcampaigns%2Ftodo%2Ftodo_14.js
>> > >
>> >       13. deploy_todo_canvas
>> >       ifr?url=
>> > http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas:664<
>> >
>> http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas
>> > >
>> >       14. initCanvas
>> >       ifr?url=
>> > http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas:547<
>> >
>> http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas
>> > >
>> >       15. (anonymous function)
>> >       ifr?url=
>> > http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas:546<
>> >
>> http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=canvas
>> > >
>> >       16. gadgets.util.runOnLoadHandlers
>> >
>> >
>> core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0:10<
>> >
>> http://localhost:8080/gadgets/js/core:rpc.js?container=default&nocache=0&debug=0&c=0&v=d75e2a8d81187de1e5623d9482587f25&jsload=0
>> > >
>> >       17. (anonymous function)
>> >
>> > '
>> >
>> > I suppose I need to make some necessary changes in the Shindig's
>> > configuration to allow trust connection between Tomcat's domain
>> > localhost:8080 and MY_SITE. What do you think about it and which
>> changes I
>> > should make?
>> >
>> >
>> > 2013/7/25 Henry Saputra <[email protected]>
>> >
>> > > Hi,
>> > >
>> > > I am sorry for the late reply.
>> > >
>> > > I am not too familiar with BonCode connector but if it makes your
>> website
>> > > as proxy to connect to Tomcat then calling
>> > > "http://MY_SITE<
>> > >
>> >
>> http://my_site/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=homeas
>> > > >"
>> > > should hit the Tomcat server and route the request to ROOT web
>> > application
>> > > which is the Shindig.
>> > >
>> > > The /gadgets is actually "servlet mapping" path which is like virtual
>> > path
>> > > where the request to that path will be handled Java servlet class.
>> > > In this case /gadgets should be handler by GadgetRenderingServlet
>> class.
>> > >
>> > > When you said "cannot load gadget" what happen when you make request
>> to
>> > >
>> > >
>> >
>> http://MY_SITE/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=ho
>> > > <
>> > >
>> >
>> http://my_site/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=homeas
>> > > >
>> > > me?
>> > >
>> > > Is there anything in the BonCode log or Tomcat <TOMCAT ROOT>/log
>> > directory?
>> > >
>> > > Once we resolve this issue, we could move on to actually incorporate
>> > > OpenSocial container that will manage gadget rendering in your page.
>> > >
>> > > - Henry
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Tue, Jul 23, 2013 at 5:44 AM, Vyacheslav Muhtarjants <
>> > > [email protected]> wrote:
>> > >
>> > > > Hello.
>> > > >
>> > > > I am an ASP.NET developer who has been involved in integration of
>> Java
>> > > > Shindig with ASP.NET web site. Following this
>> > > > video<http://www.youtube.com/watch?v=yVKiNAkhav8> I
>> > > > installed Tomcat and Shindig to my Windows server, checked the
>> iFrame
>> > > > gadgets page
>> > > >
>> > > >
>> > >
>> >
>> http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=homeand
>> > > > ensured that it worked under Tomcat. Then I connected a separate IIS
>> > > > web site and Shindig on Tomcat via BonCode connector that forwards
>> > > > requests, coming to MY_SITE, to Shindig on Tomcat. So I have
>> created a
>> > > > proxy.
>> > > >
>> > > > But I have a trouble that I cannot load any gadget through
>> > > >
>> > > >
>> > >
>> >
>> http://MY_SITE/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml&view=homeas
>> > > > I suppose gadgets/ifr is a virtual path.
>> > > >
>> > > > I would be very appreciated if somebody could hint me what I am
>> doing
>> > > wrong
>> > > > and what I should configure? Which side should it be: IIS or Tomcat?
>> > > >
>> > > > --
>> > > >
>> > > > Slava Muhtarjants
>> > > >
>> > > > ASP.NET/C# <http://asp.net/C> Developer
>> > > > RUS Wizards LLC
>> > > >
>> > > > Skype: slava.muhtarjants
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> >
>> > Slava Muhtarjants
>> >
>> > ASP.NET/C# <http://asp.net/C> Developer
>> > RUS Wizards LLC
>> >
>> > Skype: slava.muhtarjants
>> >
>>
>
>
>
> --
>
> Slava Muhtarjants
>
> ASP.NET/C# <http://asp.net/C> Developer
> RUS Wizards LLC
>
> Skype: slava.muhtarjants
>



-- 

Slava Muhtarjants

ASP.NET/C# <http://asp.net/C> Developer
RUS Wizards LLC

Skype: slava.muhtarjants

Reply via email to