Can Two Servers/Apps serve same page?
Added by Matthew Kettlewell almost 11 years ago
Hello -
I'm looking to create something like a blog app, that has a separate app for the comments
I could envision the comments being an iframe of some sort in the main frame, but I suspect there's a Wt way that might be more cohesive, and have better understanding of the page it's serving comments on.
I'm using wthttpd apps in a reverse proxy behind Nginx.
This blog/comment scenario is just one example of fairly generic problem that applies to many situations, hence my thoughts that there's a Wt way of doing this.
thanks
Matt
Replies (2)
RE: Can Two Servers/Apps serve same page? - Added by Koen Deforche almost 11 years ago
Hey Matt,
Wt has for this its 'widget-set' feature. This is how a Wt application can be hosted within a div (or multiple divs) of a 'host' page. The 'host' page can itself be a static HTML page, a dynamically generated page (e.g. PHP) or a Wt application.
This is how for example we integrate the 'chat application' as a widget inside our homepage.
See also: http://www.webtoolkit.eu/wt/blog/2010/12/17/widgetset_mode_and_cross_origin_requests
This does not use an iframe and thus has the benefit of the ability of the host application to impact on the style of the included widget; but also makes interaction and integration easier, and does not suffer any drawback typically associated with an iframe.
Regards,
koen
RE: Can Two Servers/Apps serve same page? - Added by Matthew Kettlewell almost 11 years ago
Koen -
This is exactly what I was looking/hoping for.
Thanks
Matt