You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Chris Schalk (JIRA)" <ji...@apache.org> on 2008/05/16 06:10:55 UTC

[jira] Created: (SHINDIG-272) Hard coded paths cause problems when deploying shindig to Java EE container

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: Sample container & Examples
            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.


[jira] Commented: (SHINDIG-272) Hard coded paths cause problems when deploying shindig to Java EE container

Posted by "Anthony Lai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600864#action_12600864 ] 

Anthony Lai commented on SHINDIG-272:
-------------------------------------

I happened to try and deploy Shindig to Tomcat under a context other than ROOT, and I encountered the exact same issues.  A reason for putting it in a separate context, which I think it is valid, is that we do have our main application sitting on top of the ROOT context, and there does not seem to be any reason for the need to merge shindig with our main application for things to work correctly.  Separate them in 2 different repository and war files look cleaner at least.

This issue is holding us up on deploying opensocial to our site.  Any pointers would be greatly appreciated.

> 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: Sample container & Examples
>            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.


Re: [jira] Commented: (SHINDIG-272) Hard coded paths cause problems when deploying shindig to Java EE container

Posted by Anthony Lai <an...@oracle.com>.
Hi,

  I happened to try and deploy Shindig to Tomcat under a context other 
than ROOT, and I encountered the exact same issues.  A reason for 
putting it in a separate context, which I think it is valid, is that we 
do have our main application sitting on top of the ROOT context, and 
there does not seem to be any reason for the need to merge shindig with 
our main application for things to work correctly.  Separate them in 2 
different repository and war files look cleaner at least.

  Has anyone figured out what is the problem related to the dynamic 
height or can give me hints on where the problem may be?

  Thanks.
Sincerely,
Anthony

Henning Schmiedehausen (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/SHINDIG-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597367#action_12597367 ] 
>
> Henning Schmiedehausen commented on SHINDIG-272:
> ------------------------------------------------
>
> I usually deploy it as ROOT.war to a tomcat (running as the root application) and that worked reasonably well. 
>
>   
>> 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: Sample container & Examples
>>            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.
>>     
>
>   


[jira] Commented: (SHINDIG-272) Hard coded paths cause problems when deploying shindig to Java EE container

Posted by "Henning Schmiedehausen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597367#action_12597367 ] 

Henning Schmiedehausen commented on SHINDIG-272:
------------------------------------------------

I usually deploy it as ROOT.war to a tomcat (running as the root application) and that worked reasonably well. 

> 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: Sample container & Examples
>            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.