You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Paul Payne (JIRA)" <ji...@apache.org> on 2009/04/11 19:12:14 UTC
[jira] Commented: (SHINDIG-272) Hard coded paths cause problems
when deploying shindig to Java EE container
[ https://issues.apache.org/jira/browse/SHINDIG-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698111#action_12698111 ]
Paul Payne commented on SHINDIG-272:
------------------------------------
I have resolved this issue locally. This will work for Linux and/or Mac OS X users:
1) I renamed the .war opensocial and placed into the Tomcat /webapps directory
2) Add the following to /etc/hosts:
127.0.0.1 opensocial.localhost
3) Created the following Host configuration in Tomcat. (replace TOMCAT_HOME with respective directory)
<Host name="opensocial.localhost" debug="1"
appBase="{TOMCAT_HOME}/webapps/opensocial"
autoDeploy="false"
deployOnStartup="false"
useNaming="true"
unpackWARs="true">
<Realm className="org.apache.catalina.realm.JAASRealm"
debug="99"
appName="JaasSample"
userClassName="com.iconnect.security.UserPrincipal"
roleClassName="com.iconnect.security.RolePrincipal" />
<Context path="" useNaming="true" docBase="" debug="1" reloadable="true" />
</Host>
4) Now all samples should work by using the new local host name:
http://opensocial.localhost:8080/gadgets/files/samplecontainer/samplecontainer.html
> Hard coded paths cause problems when deploying shindig to Java EE container
> ---------------------------------------------------------------------------
>
> Key: SHINDIG-272
> URL: https://issues.apache.org/jira/browse/SHINDIG-272
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Reporter: Chris Schalk
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.