You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by Jasha Joachimsthal <j....@onehippo.com> on 2012/03/28 10:49:14 UTC

Wookie host configuration

I wanted to deploy Apache Rave on my server for a demo. In [1] we have
documented how the portal makes calls to Shindig on a different location
than localhost:8080 and how to configure Shindig to let the gadgets make
calls to its external host. For the W3C widgets we bundle a war of the
Wookie server that is configured for localhost:8080.
For Wookie I changed the settings
in WEB-INF/classes/widgetserver.properties of the exploded war (ugh) to
make the W3C widgets render. Is there a cleaner way to do this by adding a
properties file to the classpath or should be put some effort in making our
own Wookie war file instead of bundling the default war file?

[1] http://rave.apache.org/documentation/host-configuration.html

Jasha Joachimsthal

Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)

www.onehippo.com

Re: Wookie host configuration

Posted by Scott Wilson <sc...@gmail.com>.
On 28 Mar 2012, at 17:29, Jasha Joachimsthal wrote:

> On 28 March 2012 18:15, Scott Wilson <sc...@gmail.com> wrote:
> 
>> 
>> On 28 Mar 2012, at 17:04, Jasha Joachimsthal wrote:
>> 
>>> On 28 March 2012 17:52, Scott Wilson <sc...@gmail.com>
>> wrote:
>>> 
>>>> On 28 Mar 2012, at 15:48, Jasha Joachimsthal wrote:
>>>> 
>>>>> On 28 March 2012 11:13, Scott Wilson <sc...@gmail.com>
>>>> wrote:
>>>>> 
>>>>>> 
>>>>>> On 28 Mar 2012, at 10:06, Jasha Joachimsthal wrote:
>>>>>> 
>>>>>>> On 28 March 2012 11:00, Scott Wilson <scott.bradley.wilson@gmail.com
>>> 
>>>>>> wrote:
>>>>>>> 
>>>>>>>> On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:
>>>>>>>> 
>>>>>>>>> I wanted to deploy Apache Rave on my server for a demo. In [1] we
>>>> have
>>>>>>>>> documented how the portal makes calls to Shindig on a different
>>>>>> location
>>>>>>>>> than localhost:8080 and how to configure Shindig to let the gadgets
>>>>>> make
>>>>>>>>> calls to its external host. For the W3C widgets we bundle a war of
>>>> the
>>>>>>>>> Wookie server that is configured for localhost:8080.
>>>>>>>>> For Wookie I changed the settings
>>>>>>>>> in WEB-INF/classes/widgetserver.properties of the exploded war
>> (ugh)
>>>> to
>>>>>>>>> make the W3C widgets render. Is there a cleaner way to do this by
>>>>>> adding
>>>>>>>> a
>>>>>>>>> properties file to the classpath or should be put some effort in
>>>> making
>>>>>>>> our
>>>>>>>>> own Wookie war file instead of bundling the default war file?
>>>>>>>> 
>>>>>>>> Wookie will look for a "local.widgetserver.properties" in the
>> servlet
>>>>>>>> container's /bin directory and merge this to override the defaults
>>>>>>>> 
>>>>>>> 
>>>>>>> Thanks, I'll try that and update the documentation. I managed to let
>>>> the
>>>>>>> widgets render in my portal, but when I retrieve their metadata, the
>>>> URL
>>>>>>> returned for the thumbnail or preview contains localhost:8080. Before
>>>>>>> submitting the form for a new widget in the portal widget store I
>>>> correct
>>>>>>> that host name. Is that also a setting in the
>>>>>> local.widgetserver.properties
>>>>>>> or is that a part of the widget metadata of the default bundled
>>>> widgets?
>>>>>> 
>>>>>> 
>>>>>> That should be taken care of when setting the virtual host properties
>>>>>> (widget.server.scheme etc).
>>>>>> 
>>>>>> If it isn't you could try deleting the db and re-deploying the WAR
>> with
>>>>>> the local.widgetserver.properties in place and see if that fixes it.
>>>>>> 
>>>>>> 
>>>>> I stopped Tomcat, deleted the exploded war, my work directory and the
>>>>> widgetDatabase folder. I added a local.widgetserver.properties file in
>> my
>>>>> tomcat/bin directory with the following properties
>>>>> 
>>>>> widget.server.scheme=http
>>>>> widget.server.hostname=rave.example.com
>>>>> widget.server.port=80
>>>>> 
>>>>> ##  local proxy settings - note if no hostname is specified then no
>> proxy
>>>>> will be used ##
>>>>> widget.proxy.scheme=http
>>>>> widget.proxy.hostname=rave.example.com
>>>>> widget.proxy.port=80
>>>>> 
>>>>> Then I started Tomcat. The widgets try to contact localhost:8080
>> instead
>>>> of
>>>>> rave.example.com:80 for the rendering so I don't see wookie widgets.
>>>> Did I
>>>>> forget something?
>>>> 
>>>> 
>>>> I don't think so... just to isolate the problem:
>>>> 
>>>> - if you make these changes directly to the exploded WAR, it works?
>>> 
>>> 
>>>> - but if you try just in {tomcat}/bin/local.widgetserver.properties, it
>>>> doesn't?
>>>> 
>>> 
>>> If I modify
>> {tomcat}/webapps/wookie/WEB-INF/classes/widgetserver.properties
>>> it works. If I set those properties in
>>> {tomcat}/bin/local.widgetserver.properties it doesn't work.
>> 
>> That's annoying. This is the relevant bit of code in Wookie:
>> 
>> 
>>     File localPropsFile = new File(System.getProperty("user.dir") +
>> File.separator + "local.widgetserver.properties");
>>     PropertiesConfiguration localConfiguration = new
>> PropertiesConfiguration(localPropsFile);
>>     CompositeConfiguration configuration = new CompositeConfiguration();
>>     configuration.addConfiguration(localConfiguration);
>>     configuration.addConfiguration(new
>> PropertiesConfiguration("widgetserver.properties"));
>> 
>> ... which should look in bin/local.widgetserver.properties for the master
>> config, and then merge in the default in WEB-INF/classes.
>> 
>> However, I just tried it with Tomcat 6 on my system and it didn't work
>> either :(
>> 
> 
> Should System.getProperty("user.dir") lead to {tomcat}/bin?
> I modified my setenv.sh so that -Duser.dir=/path/to/tomcat/bin is added to
> {CATALINA_OPTS}.
> After restarting Tomcat (and deleting the exploded war, work directory and
> widgetStore) the widgets render, but the metadata still returns
> localhost:8080 for the thumbnail url (I don't see the thumbnails in the
> widget picker either).

OK, that seems odd. There is a demo version we run here behind a vhost config:

http://demo.ict-omelette.eu/wookie/widgets?all=true 

.... and this one seems fine. 

However, this may be due to using the request rather than the configuration, in which case it will work as the request is to "dev.ict-omelette.eu". I suspect if I called it from localhost from the server using curl, the icons may be incorrectly pointing to localhost.

Are you actually loading the metadata from "http://rave.example.com/wookie/widgets"? (Or whatever its set to)?

> 
> 
>> 
>>> 
>>> 
>>>> 
>>>>> 
>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> [1] http://rave.apache.org/documentation/host-configuration.html
>>>>>>>>> 
>>>>>>>>> Jasha Joachimsthal
>>>>>>>>> 
>>>>>>>>> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
>>>>>> 4466
>>>>>>>>> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776
>> (toll
>>>>>>>> free)
>>>>>>>>> 
>>>>>>>>> www.onehippo.com
>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Wookie host configuration

Posted by Jasha Joachimsthal <j....@onehippo.com>.
On 28 March 2012 19:57, Scott Wilson <sc...@gmail.com> wrote:

>
> On 28 Mar 2012, at 17:29, Jasha Joachimsthal wrote:
> ...
>
> > Should System.getProperty("user.dir") lead to {tomcat}/bin?
> > I modified my setenv.sh so that -Duser.dir=/path/to/tomcat/bin is added
> to
> > {CATALINA_OPTS}.
> > After restarting Tomcat (and deleting the exploded war, work directory
> and
> > widgetStore) the widgets render, but the metadata still returns
> > localhost:8080 for the thumbnail url (I don't see the thumbnails in the
> > widget picker either).
>
> After a bit of digging around, it turns out that all requests apart from
> the one for the widget metadata use configuration properties to override
> the request; the /widgets request still used a legacy method that just used
> the request to generate the icon URLs. I've committed a fix for it into
> Wookie trunk so we won't have this problem in Wookie 0.10.


Thanks Scott. For the time being I'll modify my exploded war. :)

Jasha

Re: Wookie host configuration

Posted by Scott Wilson <sc...@gmail.com>.
On 28 Mar 2012, at 17:29, Jasha Joachimsthal wrote:
...

> Should System.getProperty("user.dir") lead to {tomcat}/bin?
> I modified my setenv.sh so that -Duser.dir=/path/to/tomcat/bin is added to
> {CATALINA_OPTS}.
> After restarting Tomcat (and deleting the exploded war, work directory and
> widgetStore) the widgets render, but the metadata still returns
> localhost:8080 for the thumbnail url (I don't see the thumbnails in the
> widget picker either).

After a bit of digging around, it turns out that all requests apart from the one for the widget metadata use configuration properties to override the request; the /widgets request still used a legacy method that just used the request to generate the icon URLs. I've committed a fix for it into Wookie trunk so we won't have this problem in Wookie 0.10.

Re: Wookie host configuration

Posted by Jasha Joachimsthal <j....@onehippo.com>.
On 28 March 2012 18:15, Scott Wilson <sc...@gmail.com> wrote:

>
> On 28 Mar 2012, at 17:04, Jasha Joachimsthal wrote:
>
> > On 28 March 2012 17:52, Scott Wilson <sc...@gmail.com>
> wrote:
> >
> >> On 28 Mar 2012, at 15:48, Jasha Joachimsthal wrote:
> >>
> >>> On 28 March 2012 11:13, Scott Wilson <sc...@gmail.com>
> >> wrote:
> >>>
> >>>>
> >>>> On 28 Mar 2012, at 10:06, Jasha Joachimsthal wrote:
> >>>>
> >>>>> On 28 March 2012 11:00, Scott Wilson <scott.bradley.wilson@gmail.com
> >
> >>>> wrote:
> >>>>>
> >>>>>> On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:
> >>>>>>
> >>>>>>> I wanted to deploy Apache Rave on my server for a demo. In [1] we
> >> have
> >>>>>>> documented how the portal makes calls to Shindig on a different
> >>>> location
> >>>>>>> than localhost:8080 and how to configure Shindig to let the gadgets
> >>>> make
> >>>>>>> calls to its external host. For the W3C widgets we bundle a war of
> >> the
> >>>>>>> Wookie server that is configured for localhost:8080.
> >>>>>>> For Wookie I changed the settings
> >>>>>>> in WEB-INF/classes/widgetserver.properties of the exploded war
> (ugh)
> >> to
> >>>>>>> make the W3C widgets render. Is there a cleaner way to do this by
> >>>> adding
> >>>>>> a
> >>>>>>> properties file to the classpath or should be put some effort in
> >> making
> >>>>>> our
> >>>>>>> own Wookie war file instead of bundling the default war file?
> >>>>>>
> >>>>>> Wookie will look for a "local.widgetserver.properties" in the
> servlet
> >>>>>> container's /bin directory and merge this to override the defaults
> >>>>>>
> >>>>>
> >>>>> Thanks, I'll try that and update the documentation. I managed to let
> >> the
> >>>>> widgets render in my portal, but when I retrieve their metadata, the
> >> URL
> >>>>> returned for the thumbnail or preview contains localhost:8080. Before
> >>>>> submitting the form for a new widget in the portal widget store I
> >> correct
> >>>>> that host name. Is that also a setting in the
> >>>> local.widgetserver.properties
> >>>>> or is that a part of the widget metadata of the default bundled
> >> widgets?
> >>>>
> >>>>
> >>>> That should be taken care of when setting the virtual host properties
> >>>> (widget.server.scheme etc).
> >>>>
> >>>> If it isn't you could try deleting the db and re-deploying the WAR
> with
> >>>> the local.widgetserver.properties in place and see if that fixes it.
> >>>>
> >>>>
> >>> I stopped Tomcat, deleted the exploded war, my work directory and the
> >>> widgetDatabase folder. I added a local.widgetserver.properties file in
> my
> >>> tomcat/bin directory with the following properties
> >>>
> >>> widget.server.scheme=http
> >>> widget.server.hostname=rave.example.com
> >>> widget.server.port=80
> >>>
> >>> ##  local proxy settings - note if no hostname is specified then no
> proxy
> >>> will be used ##
> >>> widget.proxy.scheme=http
> >>> widget.proxy.hostname=rave.example.com
> >>> widget.proxy.port=80
> >>>
> >>> Then I started Tomcat. The widgets try to contact localhost:8080
> instead
> >> of
> >>> rave.example.com:80 for the rendering so I don't see wookie widgets.
> >> Did I
> >>> forget something?
> >>
> >>
> >> I don't think so... just to isolate the problem:
> >>
> >> - if you make these changes directly to the exploded WAR, it works?
> >
> >
> >> - but if you try just in {tomcat}/bin/local.widgetserver.properties, it
> >> doesn't?
> >>
> >
> > If I modify
> {tomcat}/webapps/wookie/WEB-INF/classes/widgetserver.properties
> > it works. If I set those properties in
> > {tomcat}/bin/local.widgetserver.properties it doesn't work.
>
> That's annoying. This is the relevant bit of code in Wookie:
>
>
>      File localPropsFile = new File(System.getProperty("user.dir") +
> File.separator + "local.widgetserver.properties");
>      PropertiesConfiguration localConfiguration = new
> PropertiesConfiguration(localPropsFile);
>      CompositeConfiguration configuration = new CompositeConfiguration();
>      configuration.addConfiguration(localConfiguration);
>      configuration.addConfiguration(new
> PropertiesConfiguration("widgetserver.properties"));
>
> ... which should look in bin/local.widgetserver.properties for the master
> config, and then merge in the default in WEB-INF/classes.
>
> However, I just tried it with Tomcat 6 on my system and it didn't work
> either :(
>

Should System.getProperty("user.dir") lead to {tomcat}/bin?
I modified my setenv.sh so that -Duser.dir=/path/to/tomcat/bin is added to
{CATALINA_OPTS}.
After restarting Tomcat (and deleting the exploded war, work directory and
widgetStore) the widgets render, but the metadata still returns
localhost:8080 for the thumbnail url (I don't see the thumbnails in the
widget picker either).


>
> >
> >
> >>
> >>>
> >>>
> >>>>>
> >>>>>
> >>>>>>
> >>>>>>>
> >>>>>>> [1] http://rave.apache.org/documentation/host-configuration.html
> >>>>>>>
> >>>>>>> Jasha Joachimsthal
> >>>>>>>
> >>>>>>> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
> >>>> 4466
> >>>>>>> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776
> (toll
> >>>>>> free)
> >>>>>>>
> >>>>>>> www.onehippo.com
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
> >>
>
>

Re: Wookie host configuration

Posted by Scott Wilson <sc...@gmail.com>.
On 28 Mar 2012, at 17:04, Jasha Joachimsthal wrote:

> On 28 March 2012 17:52, Scott Wilson <sc...@gmail.com> wrote:
> 
>> On 28 Mar 2012, at 15:48, Jasha Joachimsthal wrote:
>> 
>>> On 28 March 2012 11:13, Scott Wilson <sc...@gmail.com>
>> wrote:
>>> 
>>>> 
>>>> On 28 Mar 2012, at 10:06, Jasha Joachimsthal wrote:
>>>> 
>>>>> On 28 March 2012 11:00, Scott Wilson <sc...@gmail.com>
>>>> wrote:
>>>>> 
>>>>>> On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:
>>>>>> 
>>>>>>> I wanted to deploy Apache Rave on my server for a demo. In [1] we
>> have
>>>>>>> documented how the portal makes calls to Shindig on a different
>>>> location
>>>>>>> than localhost:8080 and how to configure Shindig to let the gadgets
>>>> make
>>>>>>> calls to its external host. For the W3C widgets we bundle a war of
>> the
>>>>>>> Wookie server that is configured for localhost:8080.
>>>>>>> For Wookie I changed the settings
>>>>>>> in WEB-INF/classes/widgetserver.properties of the exploded war (ugh)
>> to
>>>>>>> make the W3C widgets render. Is there a cleaner way to do this by
>>>> adding
>>>>>> a
>>>>>>> properties file to the classpath or should be put some effort in
>> making
>>>>>> our
>>>>>>> own Wookie war file instead of bundling the default war file?
>>>>>> 
>>>>>> Wookie will look for a "local.widgetserver.properties" in the servlet
>>>>>> container's /bin directory and merge this to override the defaults
>>>>>> 
>>>>> 
>>>>> Thanks, I'll try that and update the documentation. I managed to let
>> the
>>>>> widgets render in my portal, but when I retrieve their metadata, the
>> URL
>>>>> returned for the thumbnail or preview contains localhost:8080. Before
>>>>> submitting the form for a new widget in the portal widget store I
>> correct
>>>>> that host name. Is that also a setting in the
>>>> local.widgetserver.properties
>>>>> or is that a part of the widget metadata of the default bundled
>> widgets?
>>>> 
>>>> 
>>>> That should be taken care of when setting the virtual host properties
>>>> (widget.server.scheme etc).
>>>> 
>>>> If it isn't you could try deleting the db and re-deploying the WAR with
>>>> the local.widgetserver.properties in place and see if that fixes it.
>>>> 
>>>> 
>>> I stopped Tomcat, deleted the exploded war, my work directory and the
>>> widgetDatabase folder. I added a local.widgetserver.properties file in my
>>> tomcat/bin directory with the following properties
>>> 
>>> widget.server.scheme=http
>>> widget.server.hostname=rave.example.com
>>> widget.server.port=80
>>> 
>>> ##  local proxy settings - note if no hostname is specified then no proxy
>>> will be used ##
>>> widget.proxy.scheme=http
>>> widget.proxy.hostname=rave.example.com
>>> widget.proxy.port=80
>>> 
>>> Then I started Tomcat. The widgets try to contact localhost:8080 instead
>> of
>>> rave.example.com:80 for the rendering so I don't see wookie widgets.
>> Did I
>>> forget something?
>> 
>> 
>> I don't think so... just to isolate the problem:
>> 
>> - if you make these changes directly to the exploded WAR, it works?
> 
> 
>> - but if you try just in {tomcat}/bin/local.widgetserver.properties, it
>> doesn't?
>> 
> 
> If I modify {tomcat}/webapps/wookie/WEB-INF/classes/widgetserver.properties
> it works. If I set those properties in
> {tomcat}/bin/local.widgetserver.properties it doesn't work.

That's annoying. This is the relevant bit of code in Wookie:


      File localPropsFile = new File(System.getProperty("user.dir") + File.separator + "local.widgetserver.properties");
      PropertiesConfiguration localConfiguration = new PropertiesConfiguration(localPropsFile);
      CompositeConfiguration configuration = new CompositeConfiguration();
      configuration.addConfiguration(localConfiguration);
      configuration.addConfiguration(new PropertiesConfiguration("widgetserver.properties"));

... which should look in bin/local.widgetserver.properties for the master config, and then merge in the default in WEB-INF/classes.

However, I just tried it with Tomcat 6 on my system and it didn't work either :(

> 
> 
>> 
>>> 
>>> 
>>>>> 
>>>>> 
>>>>>> 
>>>>>>> 
>>>>>>> [1] http://rave.apache.org/documentation/host-configuration.html
>>>>>>> 
>>>>>>> Jasha Joachimsthal
>>>>>>> 
>>>>>>> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
>>>> 4466
>>>>>>> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776(toll
>>>>>> free)
>>>>>>> 
>>>>>>> www.onehippo.com
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Wookie host configuration

Posted by Jasha Joachimsthal <j....@onehippo.com>.
On 28 March 2012 17:52, Scott Wilson <sc...@gmail.com> wrote:

> On 28 Mar 2012, at 15:48, Jasha Joachimsthal wrote:
>
> > On 28 March 2012 11:13, Scott Wilson <sc...@gmail.com>
> wrote:
> >
> >>
> >> On 28 Mar 2012, at 10:06, Jasha Joachimsthal wrote:
> >>
> >>> On 28 March 2012 11:00, Scott Wilson <sc...@gmail.com>
> >> wrote:
> >>>
> >>>> On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:
> >>>>
> >>>>> I wanted to deploy Apache Rave on my server for a demo. In [1] we
> have
> >>>>> documented how the portal makes calls to Shindig on a different
> >> location
> >>>>> than localhost:8080 and how to configure Shindig to let the gadgets
> >> make
> >>>>> calls to its external host. For the W3C widgets we bundle a war of
> the
> >>>>> Wookie server that is configured for localhost:8080.
> >>>>> For Wookie I changed the settings
> >>>>> in WEB-INF/classes/widgetserver.properties of the exploded war (ugh)
> to
> >>>>> make the W3C widgets render. Is there a cleaner way to do this by
> >> adding
> >>>> a
> >>>>> properties file to the classpath or should be put some effort in
> making
> >>>> our
> >>>>> own Wookie war file instead of bundling the default war file?
> >>>>
> >>>> Wookie will look for a "local.widgetserver.properties" in the servlet
> >>>> container's /bin directory and merge this to override the defaults
> >>>>
> >>>
> >>> Thanks, I'll try that and update the documentation. I managed to let
> the
> >>> widgets render in my portal, but when I retrieve their metadata, the
> URL
> >>> returned for the thumbnail or preview contains localhost:8080. Before
> >>> submitting the form for a new widget in the portal widget store I
> correct
> >>> that host name. Is that also a setting in the
> >> local.widgetserver.properties
> >>> or is that a part of the widget metadata of the default bundled
> widgets?
> >>
> >>
> >> That should be taken care of when setting the virtual host properties
> >> (widget.server.scheme etc).
> >>
> >> If it isn't you could try deleting the db and re-deploying the WAR with
> >> the local.widgetserver.properties in place and see if that fixes it.
> >>
> >>
> > I stopped Tomcat, deleted the exploded war, my work directory and the
> > widgetDatabase folder. I added a local.widgetserver.properties file in my
> > tomcat/bin directory with the following properties
> >
> > widget.server.scheme=http
> > widget.server.hostname=rave.example.com
> > widget.server.port=80
> >
> > ##  local proxy settings - note if no hostname is specified then no proxy
> > will be used ##
> > widget.proxy.scheme=http
> > widget.proxy.hostname=rave.example.com
> > widget.proxy.port=80
> >
> > Then I started Tomcat. The widgets try to contact localhost:8080 instead
> of
> > rave.example.com:80 for the rendering so I don't see wookie widgets.
> Did I
> > forget something?
>
>
> I don't think so... just to isolate the problem:
>
> - if you make these changes directly to the exploded WAR, it works?


> - but if you try just in {tomcat}/bin/local.widgetserver.properties, it
> doesn't?
>

If I modify {tomcat}/webapps/wookie/WEB-INF/classes/widgetserver.properties
it works. If I set those properties in
{tomcat}/bin/local.widgetserver.properties it doesn't work.


>
> >
> >
> >>>
> >>>
> >>>>
> >>>>>
> >>>>> [1] http://rave.apache.org/documentation/host-configuration.html
> >>>>>
> >>>>> Jasha Joachimsthal
> >>>>>
> >>>>> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
> >> 4466
> >>>>> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776(toll
> >>>> free)
> >>>>>
> >>>>> www.onehippo.com
> >>>>
> >>>>
> >>
> >>
>
>

Re: Wookie host configuration

Posted by Scott Wilson <sc...@gmail.com>.
On 28 Mar 2012, at 15:48, Jasha Joachimsthal wrote:

> On 28 March 2012 11:13, Scott Wilson <sc...@gmail.com> wrote:
> 
>> 
>> On 28 Mar 2012, at 10:06, Jasha Joachimsthal wrote:
>> 
>>> On 28 March 2012 11:00, Scott Wilson <sc...@gmail.com>
>> wrote:
>>> 
>>>> On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:
>>>> 
>>>>> I wanted to deploy Apache Rave on my server for a demo. In [1] we have
>>>>> documented how the portal makes calls to Shindig on a different
>> location
>>>>> than localhost:8080 and how to configure Shindig to let the gadgets
>> make
>>>>> calls to its external host. For the W3C widgets we bundle a war of the
>>>>> Wookie server that is configured for localhost:8080.
>>>>> For Wookie I changed the settings
>>>>> in WEB-INF/classes/widgetserver.properties of the exploded war (ugh) to
>>>>> make the W3C widgets render. Is there a cleaner way to do this by
>> adding
>>>> a
>>>>> properties file to the classpath or should be put some effort in making
>>>> our
>>>>> own Wookie war file instead of bundling the default war file?
>>>> 
>>>> Wookie will look for a "local.widgetserver.properties" in the servlet
>>>> container's /bin directory and merge this to override the defaults
>>>> 
>>> 
>>> Thanks, I'll try that and update the documentation. I managed to let the
>>> widgets render in my portal, but when I retrieve their metadata, the URL
>>> returned for the thumbnail or preview contains localhost:8080. Before
>>> submitting the form for a new widget in the portal widget store I correct
>>> that host name. Is that also a setting in the
>> local.widgetserver.properties
>>> or is that a part of the widget metadata of the default bundled widgets?
>> 
>> 
>> That should be taken care of when setting the virtual host properties
>> (widget.server.scheme etc).
>> 
>> If it isn't you could try deleting the db and re-deploying the WAR with
>> the local.widgetserver.properties in place and see if that fixes it.
>> 
>> 
> I stopped Tomcat, deleted the exploded war, my work directory and the
> widgetDatabase folder. I added a local.widgetserver.properties file in my
> tomcat/bin directory with the following properties
> 
> widget.server.scheme=http
> widget.server.hostname=rave.example.com
> widget.server.port=80
> 
> ##  local proxy settings - note if no hostname is specified then no proxy
> will be used ##
> widget.proxy.scheme=http
> widget.proxy.hostname=rave.example.com
> widget.proxy.port=80
> 
> Then I started Tomcat. The widgets try to contact localhost:8080 instead of
> rave.example.com:80 for the rendering so I don't see wookie widgets. Did I
> forget something?


I don't think so... just to isolate the problem:

- if you make these changes directly to the exploded WAR, it works?

- but if you try just in {tomcat}/bin/local.widgetserver.properties, it doesn't?

> 
> 
>>> 
>>> 
>>>> 
>>>>> 
>>>>> [1] http://rave.apache.org/documentation/host-configuration.html
>>>>> 
>>>>> Jasha Joachimsthal
>>>>> 
>>>>> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
>> 4466
>>>>> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
>>>> free)
>>>>> 
>>>>> www.onehippo.com
>>>> 
>>>> 
>> 
>> 


Re: Wookie host configuration

Posted by Jasha Joachimsthal <j....@onehippo.com>.
On 28 March 2012 11:13, Scott Wilson <sc...@gmail.com> wrote:

>
> On 28 Mar 2012, at 10:06, Jasha Joachimsthal wrote:
>
> > On 28 March 2012 11:00, Scott Wilson <sc...@gmail.com>
> wrote:
> >
> >> On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:
> >>
> >>> I wanted to deploy Apache Rave on my server for a demo. In [1] we have
> >>> documented how the portal makes calls to Shindig on a different
> location
> >>> than localhost:8080 and how to configure Shindig to let the gadgets
> make
> >>> calls to its external host. For the W3C widgets we bundle a war of the
> >>> Wookie server that is configured for localhost:8080.
> >>> For Wookie I changed the settings
> >>> in WEB-INF/classes/widgetserver.properties of the exploded war (ugh) to
> >>> make the W3C widgets render. Is there a cleaner way to do this by
> adding
> >> a
> >>> properties file to the classpath or should be put some effort in making
> >> our
> >>> own Wookie war file instead of bundling the default war file?
> >>
> >> Wookie will look for a "local.widgetserver.properties" in the servlet
> >> container's /bin directory and merge this to override the defaults
> >>
> >
> > Thanks, I'll try that and update the documentation. I managed to let the
> > widgets render in my portal, but when I retrieve their metadata, the URL
> > returned for the thumbnail or preview contains localhost:8080. Before
> > submitting the form for a new widget in the portal widget store I correct
> > that host name. Is that also a setting in the
> local.widgetserver.properties
> > or is that a part of the widget metadata of the default bundled widgets?
>
>
> That should be taken care of when setting the virtual host properties
> (widget.server.scheme etc).
>
> If it isn't you could try deleting the db and re-deploying the WAR with
> the local.widgetserver.properties in place and see if that fixes it.
>
>
I stopped Tomcat, deleted the exploded war, my work directory and the
widgetDatabase folder. I added a local.widgetserver.properties file in my
tomcat/bin directory with the following properties

widget.server.scheme=http
widget.server.hostname=rave.example.com
widget.server.port=80

##  local proxy settings - note if no hostname is specified then no proxy
will be used ##
widget.proxy.scheme=http
widget.proxy.hostname=rave.example.com
widget.proxy.port=80

Then I started Tomcat. The widgets try to contact localhost:8080 instead of
rave.example.com:80 for the rendering so I don't see wookie widgets. Did I
forget something?


> >
> >
> >>
> >>>
> >>> [1] http://rave.apache.org/documentation/host-configuration.html
> >>>
> >>> Jasha Joachimsthal
> >>>
> >>> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
> 4466
> >>> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
> >> free)
> >>>
> >>> www.onehippo.com
> >>
> >>
>
>

Re: Wookie host configuration

Posted by Scott Wilson <sc...@gmail.com>.
On 28 Mar 2012, at 10:06, Jasha Joachimsthal wrote:

> On 28 March 2012 11:00, Scott Wilson <sc...@gmail.com> wrote:
> 
>> On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:
>> 
>>> I wanted to deploy Apache Rave on my server for a demo. In [1] we have
>>> documented how the portal makes calls to Shindig on a different location
>>> than localhost:8080 and how to configure Shindig to let the gadgets make
>>> calls to its external host. For the W3C widgets we bundle a war of the
>>> Wookie server that is configured for localhost:8080.
>>> For Wookie I changed the settings
>>> in WEB-INF/classes/widgetserver.properties of the exploded war (ugh) to
>>> make the W3C widgets render. Is there a cleaner way to do this by adding
>> a
>>> properties file to the classpath or should be put some effort in making
>> our
>>> own Wookie war file instead of bundling the default war file?
>> 
>> Wookie will look for a "local.widgetserver.properties" in the servlet
>> container's /bin directory and merge this to override the defaults
>> 
> 
> Thanks, I'll try that and update the documentation. I managed to let the
> widgets render in my portal, but when I retrieve their metadata, the URL
> returned for the thumbnail or preview contains localhost:8080. Before
> submitting the form for a new widget in the portal widget store I correct
> that host name. Is that also a setting in the local.widgetserver.properties
> or is that a part of the widget metadata of the default bundled widgets?


That should be taken care of when setting the virtual host properties (widget.server.scheme etc).

If it isn't you could try deleting the db and re-deploying the WAR with the local.widgetserver.properties in place and see if that fixes it.

> 
> 
>> 
>>> 
>>> [1] http://rave.apache.org/documentation/host-configuration.html
>>> 
>>> Jasha Joachimsthal
>>> 
>>> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
>>> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
>> free)
>>> 
>>> www.onehippo.com
>> 
>> 


Re: Wookie host configuration

Posted by Jasha Joachimsthal <j....@onehippo.com>.
On 28 March 2012 11:00, Scott Wilson <sc...@gmail.com> wrote:

> On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:
>
> > I wanted to deploy Apache Rave on my server for a demo. In [1] we have
> > documented how the portal makes calls to Shindig on a different location
> > than localhost:8080 and how to configure Shindig to let the gadgets make
> > calls to its external host. For the W3C widgets we bundle a war of the
> > Wookie server that is configured for localhost:8080.
> > For Wookie I changed the settings
> > in WEB-INF/classes/widgetserver.properties of the exploded war (ugh) to
> > make the W3C widgets render. Is there a cleaner way to do this by adding
> a
> > properties file to the classpath or should be put some effort in making
> our
> > own Wookie war file instead of bundling the default war file?
>
> Wookie will look for a "local.widgetserver.properties" in the servlet
> container's /bin directory and merge this to override the defaults
>

Thanks, I'll try that and update the documentation. I managed to let the
widgets render in my portal, but when I retrieve their metadata, the URL
returned for the thumbnail or preview contains localhost:8080. Before
submitting the form for a new widget in the portal widget store I correct
that host name. Is that also a setting in the local.widgetserver.properties
or is that a part of the widget metadata of the default bundled widgets?


>
> >
> > [1] http://rave.apache.org/documentation/host-configuration.html
> >
> > Jasha Joachimsthal
> >
> > Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> > US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
> free)
> >
> > www.onehippo.com
>
>

Re: Wookie host configuration

Posted by Scott Wilson <sc...@gmail.com>.
On 28 Mar 2012, at 09:49, Jasha Joachimsthal wrote:

> I wanted to deploy Apache Rave on my server for a demo. In [1] we have
> documented how the portal makes calls to Shindig on a different location
> than localhost:8080 and how to configure Shindig to let the gadgets make
> calls to its external host. For the W3C widgets we bundle a war of the
> Wookie server that is configured for localhost:8080.
> For Wookie I changed the settings
> in WEB-INF/classes/widgetserver.properties of the exploded war (ugh) to
> make the W3C widgets render. Is there a cleaner way to do this by adding a
> properties file to the classpath or should be put some effort in making our
> own Wookie war file instead of bundling the default war file?

Wookie will look for a "local.widgetserver.properties" in the servlet container's /bin directory and merge this to override the defaults

> 
> [1] http://rave.apache.org/documentation/host-configuration.html
> 
> Jasha Joachimsthal
> 
> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)
> 
> www.onehippo.com