Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Resources loading from different directory

    Hi,

    I am using SmartGWT version 2.4 and have created a GUI which is currently deployed at the root "/" of my application, ie /BrandEditor.

    When I include this control from /index.html everything looks and works great. However, if I try to include this control from /nested/otherPage.html the control loads just fine, but the requests for resources go to /nested/BrandEditor/... which produces a 404 on a client and no resources are loaded.

    I am using gwt-maven-plugin to compile and then Maven to package. There are two solutions that I can see:

    1) Somehow tell the control specifically where to load the resources from and not use the relative path.

    2) Move the control into the directory tree with the host page such that both the page and control directory are siblings as they are at the root.

    Basically, my application consists of a number of .jsp pages which will have some SmartGwt components on them. (Spring/MVC/Tiles/SmartGWT app).

    I am not sure how to do either of these. Can someone help.

    Thanks.
    -AP_
    Last edited by apara; 25 Jun 2011, 12:05.

    #2
    Looks like I found my solution:

    <script> var isomorphicDir = "MODULE_NAME/sc/"; </script>

    This tells the library where the SC directory lives.

    -AP_

    Comment

    Working...
    X