|
Re: cross scripting issues - can RAP serve HTML documents? [message #111530 is a reply to message #111489] |
Thu, 06 November 2008 18:31   |
Stefan  Messages: 316 Registered: July 2009 |
Senior Member |
|
|
Hi Alex,
you can use the extension point
"org.eclipse.equinox.http.registry.resources" to specify a directory
with your html-files. The field "alias" would be "/resources" (same as
in URL), the field "base-name" must point the location in your bundle,
where these html-files are (e.g. "/html").
Hope that helps,
Stefan.
Alex schrieb:
> Hello,
> I need to access the elements of an HTML page which is embedded in a
> custom widget using a qx.ui.embed.Iframe
>
> Currently the embedded HTML page is served by an apache running on
> localhost:80, while RAP is running on localhost:9090. If I understood
> correctly, security measures restrict the Iframe object from modifying
> the embedded contents or executing javascript, because they come from a
> different server.
> My simple question is, what is necessary to serve the embedded document
> (up to now http://localhost/tmp/test.html) from the RAP server, for
> example at http://localhost:9090/resources/test.html?
>
> My guess was that I have to define an extension at point
> org.eclipse.rap.ui.resources with a class that implements
> org.eclipse.rwt.resources.IResource. However defining "public String
> getLocation() { return "resources/test.html"; }" in that class doesn't
> serve the file (resource/test.html in the project tree) at
> http://localhost:9090/resources/test.html. What is wrong?
>
> Thank you
> Alex
>
|
|
|
Re: cross scripting issues - can RAP serve HTML documents? [message #111543 is a reply to message #111530] |
Thu, 06 November 2008 19:55   |
Alex Messages: 3 Registered: July 2009 |
Junior Member |
|
|
Thank you Stefan,
I think this is exactly what I'm looking for. However, I'm using the the
jetty server (this is the default, isn't it?) not the equinox http server.
Nevertheless I followed your suggestion, but accessing the test page
leaves a blank page (no background image, no error message). Is the
org.eclipse.equinox.http.registry.resources extension point supposed to
work with the jetty server, or is there another solution for jetty, or do
I have to configure RAP to use the equinox server (how)?
Thanks
Alex
Stefan Roeck wrote:
> Hi Alex,
> you can use the extension point
> "org.eclipse.equinox.http.registry.resources" to specify a directory
> with your html-files. The field "alias" would be "/resources" (same as
> in URL), the field "base-name" must point the location in your bundle,
> where these html-files are (e.g. "/html").
> Hope that helps,
> Stefan.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02331 seconds