Announcement

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

    How To Reside SmartClient's Static Contents On Another Server?

    We plan to have a dedicated Apache web server farm to serve the static contents of our web application. We tried to migrate the folder "isomorphic" from Jetty servlet container to an Apache server 192.168.0.11. In the JSP file, I replaced
    Code:
    <isomorphic:loadISC includeModules="RealtimeMessaging" skin="SmartClient" runat="server"/>
    with
    Code:
    <SCRIPT>window.isomorphicDir='http://192.168.0.11/isomorphic/';</SCRIPT>
    <SCRIPT SRC=http://192.168.0.11/isomorphic/system/development/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=http://192.168.0.11/isomorphic/system/development/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=http://192.168.0.11/isomorphic/system/development/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=http://192.168.0.11/isomorphic/system/development/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=http://192.168.0.11/isomorphic/system/development/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=http://192.168.0.11/isomorphic/system/development/ISC_DataBinding.js></SCRIPT>
    <SCRIPT SRC=http://192.168.0.11/isomorphic/system/development/ISC_RealtimeMessaging.js></SCRIPT>
    <SCRIPT src=http://192.168.0.11/isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
    However, we don't know how to change this in server.properties.
    Code:
    isomorphicPathRootRelative: isomorphic
    Is there a directive isomorphicPathRootAbsolute in server.properties, like the following?
    Code:
    isomorphicPathRootAbsolute: http://192.168.0.11/isomorphic

    #2
    Since you are not using the loadISC tag, you shouldn't need to bother with setting that property in server.properties. Why do you ask, are you actually encountering a problem?

    Comment


      #3
      Since I prefer loadISC tag, which is tidy and can be managed easily.

      BTW, I got the following error message during startup of the web application if I remove the isomorphicPathRootRelative directive in server.xml.
      Code:
      [main] ERROR ISCInit - Can't find marker file for webRoot:
      C:/Jetty/webapps/MyApp/isomorphic for
      configured/autodetected webRoot - if you moved the
      'isomorphic' directory, please set isomorphicDirRootRelative 
      in server.properties to the new location and restart the 
      servlet engine.

      Comment


        #4
        You can use the "isomorphicURI" property of the loadISCTag to load resources offsite. Sorry, there's currently no way to set a default isomorphicURI that points offsite - it may be added in the future.

        Comment


          #5
          Hello, I've just found that if I change the isomorphicURI property (to load SmartClient's static resource from another server - apache), then the IDACall URL called from client changes also.
          Is it expected? How may I change only the URL used for static resources?

          Comment


            #6
            You can change dynamic URLs, such as RPCManager.acionURL or the DataSourceLoader URL, back to the current server.

            Another approach would be to change the skinDir only, and manually write out the script src tags rather than use the JSP tags.

            Comment


              #7
              It works, thanks.
              But now that I load the isomorphic dir resources from another server, I've got this warning:
              Code:
              *17:39:12.905:TMR7:WARN:fontLoading:Timed out waiting on load of custom fonts: Roboto-Medium
              which I've added in the window.isc_additionalFonts array.

              There's another URL I must change?

              Comment


                #8
                Robot-Medium is a font defined in a @font-face declaration in your own CSS?

                Comment


                  #9
                  Yes, it's defined like this:

                  Code:
                  @font-face {
                      font-family: 'Roboto-Medium';
                      src: url('fonts/Roboto/Roboto-Medium-webfont.eot');
                      src: url('fonts/Roboto/Roboto-Medium-webfont.eot?#iefix') format('embedded-opentype'),
                      url('fonts/Roboto/Roboto-Medium-webfont.woff') format('woff'),
                      url('fonts/Roboto/Roboto-Medium-webfont.ttf') format('truetype'),
                      url('fonts/Roboto/Roboto-Medium-webfont.svg#robotomedium') format('svg');
                      font-weight: normal;
                      font-style: normal;
                  }
                  I've just tried to load also the css and fonts from the same apache server but the WARN is still there.

                  Comment


                    #10
                    Also after some test, it seems that page loading is slower.
                    Is it credit to the compression feature of the network performance module?

                    Comment


                      #11
                      There are many possible explanations. Start from the Network tab in built-in browser tools and watch how long loading takes in each scenario, and what's contributing.

                      Comment


                        #12
                        Originally posted by Isomorphic View Post
                        There are many possible explanations. Start from the Network tab in built-in browser tools and watch how long loading takes in each scenario, and what's contributing.
                        ok, I'll try to understand what's happening.

                        And what about the fontLoading warn?

                        Comment


                          #13
                          Originally posted by claudiobosticco View Post
                          It works, thanks.
                          But now that I load the isomorphic dir resources from another server, I've got this warning:
                          Code:
                          *17:39:12.905:TMR7:WARN:fontLoading:Timed out waiting on load of custom fonts: Roboto-Medium
                          which I've added in the window.isc_additionalFonts array.

                          There's another URL I must change?
                          Actually I've just discovered that I must set
                          window.isc_useCSSFontAPI = true
                          I didn't have this problem before because while doing those tests I've also updated the SmartClient version.

                          Comment


                            #14
                            It shouldn't be necessary to set window.isc_useCSSFontAPI = true just to get a font to load from window.isc_additionalFonts if you've defined it properly in CSS and loaded the CSS (except as doc'd where you have more than one custom font for a single font family name). You should see in the Network Tab that the browser has made a request for the font file defined in your @font-face. If there's no response as indicated in the Network Tab with the timeout (20 seconds), that would explain the warning.

                            Comment

                            Working...
                            X