GWT Interview Questions and Answers For Freshers Part-2
12.What is the purpose of ‘public’ tag in *.gwt.xml file in GWT?
The public path is the place in your project where static resources referenced by your GWT module, such as CSS or images, are stored.
13.What is default public path for static resources in GWT application?
The default public path is the public subdirectory underneath where the Module XML File is stored.
14.What is the purpose of ‘script’ tag in *.gwt.xml file in GWT?
15.What is the purpose of ‘stylesheet’ tag in *.gwt.xml file in GWT?
Automatically injects the external CSS file located at the location specified by src.
16.What is an entry-point class?
A module entry-point is any class that is assignable to EntryPoint and that can be constructed without parameters. When a module is loaded, every entry point class is instantiated and its EntryPoint.onModuleLoad() method gets called.
17.What is *.nocache.js file in GWT?
18.What is .cache.html file in GWT?
It contains the actual program of a GWT application.
19.Explain bootstrap procedure for GWT application.
Following are the steps of bootstrap proceure for GWT application when a browser loads the GWT application −
Browser loads the host html page and .nocache.js file.
.nocache.js code resolves deferred binding configuarations (for example, browser detection) and use lookup table generated by GWT compiler to locate one of the .cache.html.
.nocache.js code then creates a html hidden iframe, inserts that iframe into the host page’s DOM, and loads the .cache.html file into the same iframe.
.cache.html contains the actual program of a GWT application and once loaded in iframe shows the GWT application in the browser.
20.Why should a .nocache.js file never be cached?
GWT compiler generates .nocache.js file every time with the same name whenever a GWT application is compiled. So browser should always download the .nocache.js file to get the latest gwt application. gwt.js code actually appends a unique timestamp at the end of the file name so that browser always treat it a new file and should never cache it.