Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
var element = this.getElement();
element.innerHTML = '<x3d width=\'500px\' height=\'400px\'>' +
// '<inline nameSpaceName="Deer" mapDEFToID="true" onclick="redNose();"
//url="http://doc.x3dom.org/tutorials/models/inline/Deer.x3d" > </inline>' + //works!
// '<inline nameSpaceName="Deer" mapDEFToID="true" onclick=\'redNose();\'
// url="WebContent/VAADIN/themes/x3d_testproject/x3d_example_file/x3d_example_file/Deer.x3d" //load=truerender=true > </inline>' + //doesn't work
'<inline nameSpaceName="Deer" mapDEFToID="true" onclick=\'redNose();\'
url="WebContent/WEB-INF/x3d_example_file/Deer.x3d" load=true render=true > </inline>' + //doesn't work
I have also tried using an http url with my local glassfish server and that didn't work either.
X3D uses an XMLHttpRequest to load the file. Is there something I need to set either in the project or in the glassfish server to access these files? I've done many other things with many types of files and have not run into any similar issues. Is there anything else I should look at?
Also, I have verified that the local x3d file works in a 3rd party application.
If I create a static HTML page with the same code, then it works. It seems there may be some conflict in js import within the vaadin application.
Any suggestion would be very appreciated.