1.4Beta & script loading

8 views
Skip to first unread message

Berzehk

unread,
Apr 19, 2007, 11:11:16 AM4/19/07
to Google Web Toolkit
Hello,
i have troubles launching my project. I tried to use GWT 1.4, but it
wasn't working properly, and when i went back to 1.3.3, the project
wouldnt work anymore. It tries to load org.mycomp.myClass.nocache.js,
and it won't find any as it is named .html . I just cant find out why
it tries to load a nocache.html as it is not mentionned anywhere on my
project!

Bernard Choi

unread,
Apr 19, 2007, 11:45:52 AM4/19/07
to Google-We...@googlegroups.com
Greetings Berzehk.

try that you have the following in your HTML file ...

  <head>
        <meta name='gwt:module' content='org.mycomp.myClass'>
    </head>
    <body>
        <script language="javascript" src="gwt.js"></script>

and remove the line that loads org.mycomp.myClass.nocache.js

From what I understand, 1.3.3 generates and uses gwt.js and *.nocache.html.
1.4 uses the *.nocache.js

You've mixed up code from 1.3.3 and 1.4, just like I did. :-)

Adam T

unread,
Apr 19, 2007, 1:19:53 PM4/19/07
to Google Web Toolkit
Hej!

GWT <1.4 uses gwt.js as the bootstrapping file and that looks in your
HTML file for a

<meta name="gwt:module" content="org.myapp.Application">

tag - then it loads the appropriate org.myapp.Application.nocache.html
file which then loaded the appropriate XXX.cache.html file for the
permutation of properties required (e.g. browser, locale, etc).

GWT 1.4, when it is released, will do away with the absolute need for
gwt.js and the gwt:module tag. Instead, one of three loading
approaches can be used.

a) in your main HTML file you link directly to a
org.myapp.Application.nocache.js file which then loads the appropriate
XXXXXXXX.cache.html file (this contains the JavaScript code wrapped in
a HTML file, allowing the server to zip up the data if required).
This approach also tries to automatically start your application once
it is loaded.

b) you link directly to a org.myapp.Application.nocache-xs.js file;
this then loads the appropriate XXXXXXXX.cache.js file (which is the
same JavaScript code as in (b), but is not wrapped in a HTML file)

c) 1.4 still produces the gwt.js file, so if you have legacy main html
file that loads your application it will still work; but this version
of gwt.js just looks for any legacy gwt:module tag and loads the
appropriate *.nocache.js file as in approach (a) above)

Or at least that is how I understand it works!!

//Adam

On Apr 19, 5:45 pm, "Bernard Choi" <bch...@gmail.com> wrote:
> Greetings Berzehk.
>
> try that you have the following in your HTML file ...
>
> <head>
> <meta name='gwt:module' content='org.mycomp.myClass'>
> </head>
> <body>
> <script language="javascript" src="gwt.js"></script>
>
> and remove the line that loads org.mycomp.myClass.nocache.js
>
> From what I understand, 1.3.3 generates and uses gwt.js and *.nocache.html.
> 1.4 uses the *.nocache.js
>
> You've mixed up code from 1.3.3 and 1.4, just like I did. :-)
>

> On 4/19/07, Berzehk <berz...@gmail.com> wrote:
>
>
>
> > Hello,
> > i have troubles launching my project. I tried to use GWT 1.4, but it
> > wasn't working properly, and when i went back to 1.3.3, the project
> > wouldnt work anymore. It tries to load org.mycomp.myClass.nocache.js,
> > and it won't find any as it is named .html . I just cant find out why
> > it tries to load a nocache.html as it is not mentionned anywhere on my
> > project!
>

> --
> Well Wishes,
> Bernard Choi

Reply all
Reply to author
Forward
0 new messages