Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-272

Hard coded paths cause problems when deploying shindig to Java EE container

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0
    • Javascript
    • None

    Description

      In the interest of making Shindig easier for people deploying to servers outside just running from Jetty, I came across some hard code path issues in the samplecontainer.
      Currently if I take the generated war file in java/server/target: shindig-server-1-SNAPSHOT.war and deploy it to a Java EE container like tomcat or Glassfish, I'm not able to get the samplecontainer and social data stuff running very easily.

      • For example to deploy to tomcat, I rename the war file to shindig.war and toss in the webapps directory. I should be able to go to host:port/shindig/gadgets/files/samplecontainer/samplecontainer.html and see the app running.

      Currently I have to do the following to get it close:
      1. Edit the config/container.js and add "/shindig" to opensocial path:
      "opensocial-0.7" : {
      // Path to fetch opensocial data from
      // Must be on the same domain as the gadget rendering server
      "path" : "/shindig/social/data",

      2. I have to edit the "socialDataPath" in the SampleContainer.html to include "shindig".
      var socialDataPath = document.location.protocol + "//" + document.location.host
      + "/shindig/social/data";

      3. I also see that when I do these updates, I still see a problem rendering the gadget. The SocialHelloWorld gadget no longer dynamically adjusts for height.

      Here's what I'd recommend:

      • Instead of generating shindig-server-1-SNAPSHOT.war - let's just call it shindig.war. That way you don't have to always rename it.
      • Remove the need to have to edit the path to the social data in the config. We should be hopefully be able to determine this automatically.
      • For the SampleContainer.html, I would deduce the correct path to social data as well so it's not hard coded either.

      Also the dynamic height issue is troublesome. I'm sure it's related though.

      Additionally it would be really nice to just go to: host:port/shindig and see a nice home page for Shindig - maybe a separate issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cschalk Chris Schalk
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: