- After svn checkout, cd to $HOME/shindig/java/gadgets (or wherever you installed).
- Run "mvn package" and then "mvn jetty:run-war" from this directory.
- Point your browser at
or similar. Note this is an "aggregating client container" for collecting and displaying gadgets. The gadgets are loaded as XML from a specified remote URL and arranged using a layout manager. However, these containers don't know anything about your social networks--they are just for presentation and organization of content. If you actually want to host your own social gadgets you will need to deploy them into the "gadget hosting container"(e.g. Orkut or some other app). This is available on your Shindig server at
- Note the aggregating client container just shows how to add gadgets from multiple providers. Any social networking information is NOT controlled or accessible by these containers. To run your own gadget and manipulate social network information (such as a user's profile and list of friends), you will need to run your gadget in a container.
You'll then have to shutdown and restart jetty.
This is a little non-intuitive directory layout but see java/gadgets/pom.xml.
Hosting your own gadgets.
- Place your widget code in
or any subdirectory (like /examples/).
- After compilation, these will be located in
or any subdirectory (/examples/ in the shindig SVN).
- These will be served up from
- You can use the XML from the sample widget at
- Just download or cut and past this XML file onto your local file system.
- For some reason, you will need to change the top:
<ModulePrefs title="Title of Your Application">
<ModulePrefs title="People API Howto">
This seems to have been corrected in newer versions. Check the header of the sample gadget and use this as a guideline for your gadget.
- Anyway, load the samplecontainer URL (http://localhost:8080/gadgets/files/samplecontainer/examples/myapp.xml) in your browser, and then load your gadget by pasting in the URL
- If you edit your gadget in any way, you must (apparently) restart your Jetty server.
This gadget is now ready to be displayed in any gadget container.
Putting Your Gadget Into Your Display Container
In the last previous two steps, you a) displayed existing gadgets using the gadget display container and b) set up your own gadget hosting container. The documentation doesn't very clearly distinguish these, but you should see this by now. The display container can load any gadgets (including production gadgets available from iGoogle). The gadget hosting container, on the other hand, is used to run your gadgets with your social network data.
We can now combine the two. Edit any of the sample HTML files in java/target/gadgets/files/container, changing the URL to point to the gadget you made in the previous example. Restart your Jetty server and you should see it correctly displayed.
Similarly, you should be able (if your Jetty server's URL is publicly accessible) to add your social gadget to other display containers.