aspose file tools*
The moose likes GWT and the fly likes JavaScript resources seems to be loading from wrong location when <script is on nested page... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "JavaScript resources seems to be loading from wrong location when <script is on nested page..." Watch "JavaScript resources seems to be loading from wrong location when <script is on nested page..." New topic
Author

JavaScript resources seems to be loading from wrong location when <script is on nested page...

Alex Paransky J
Greenhorn

Joined: May 23, 2011
Posts: 11
I created a SmartGWT button and invoked it from /index.html, everything looks fine. Then I invoked it from /nested/index.html, the code loads, however, I see the browser is trying to load resources from .../nested/... and getting a 404 as my script and all resources are deployed at /. How do I work around this?

In other words, if I execute:



I always want to read everything from /printer-admin/BrandEditor/*. As it happens now, the code is loaded from this directory, however, resource requests are going to /printer-admin/nested/BrandEditor.

Alternatively, I could compile the module and place is relative to the page that's its going to be displayed from, however, I am not quite sure how to do that with Maven and the gwt-maven-plugin tool.

Thanks for any help.

-AP_
 
jQuery in Action, 2nd edition
 
subject: JavaScript resources seems to be loading from wrong location when <script is on nested page...