Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser window displays incorrectly after exporting(Embedded <script> tags are not resolved)
SWT Browser window displays incorrectly after exporting [message #901321] Fri, 10 August 2012 19:28 Go to next message
Terry Jahelka is currently offline Terry JahelkaFriend
Messages: 23
Registered: February 2012
Junior Member
I have an Eclipse RCP application created using Indigo. Application includes an SWT Browser window. HTML for the browser window displays an OpenLayers map. HTML attached. When I run from the Eclipse IDE browser window displays correctly. After I export using the export wizard, the browser window will launch but the map does not appear. Two screen prints attached. There are no errors in the JAVA console, OSGI console shows the plugin active with no unsatisfied dependencies. I've verified the jar file is complete and that the plugin manifest class path contains all the folders.

Resource is loaded by the application using:

public static URL locateResource(String relativePath) {
URL fileUrl = null;

try {
Bundle bundle = getDefault().getBundle();
Path path = new Path(relativePath); //$NON-NLS-1$
URL url = FileLocator.find(bundle, path, Collections.EMPTY_MAP);
fileUrl = FileLocator.toFileURL(url);
} catch (Exception e) {
// Will happen if the file cannot be read for some reason
e.printStackTrace();
}

return fileUrl;

}

Any ideas or suggestions would be greatly appreciated.
Re: SWT Browser window displays incorrectly after exporting [message #901397 is a reply to message #901321] Sat, 11 August 2012 18:06 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
When I load your map.html in my browser (typing this from an iPad) I see the same as your "Browser with HTML.png" as I don't have your OpenLayers.js or CoordinateDonverter.js available. Make sure those files are marked to be included in your build.properties.
Re: SWT Browser window displays incorrectly after exporting [message #901597 is a reply to message #901397] Mon, 13 August 2012 15:26 Go to previous message
Terry Jahelka is currently offline Terry JahelkaFriend
Messages: 23
Registered: February 2012
Junior Member
Resolved, appears problem is trying to serve up all of the html and javascript files from the bundle jar. Moved the html and javascript to a webserver and used the full url in the setUrl on the browser and all is well.
Previous Topic:Maximum width of a control?
Next Topic:Option in javadoc to rename interfaces/classes
Goto Forum:
  


Current Time: Fri Mar 29 07:16:56 GMT 2024

Powered by FUDForum. Page generated in 0.02821 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top