Understanding Creation of GWT Serialization Policy Files (.gwt.rpc)

Today I deep-dived a bit into how GWT creates and reads Serialization Policy files. These are the .gwt.rpc files which are generated beside the JavaScript files for GWT modules. Chiefly, I learned two things: The .gwt.rpc files are only used by the server. The client never reads them. The .gwt.rpc files are generated in the … Continue reading Understanding Creation of GWT Serialization Policy Files (.gwt.rpc)

Cross-Domain Requests in GWT with JSONP

GWT RPC is built upon AJAX requests and thus is subject to the Same-Origin Policy. However, it is really easy in GWT (as well as in other JavaScript applications) to circumvent this policy using a method called JSON-with-padding (JSONP). Unfortunately, there are a couple of issues one needs to consider before utilizing JSON-P: Amount of Data Send … Continue reading Cross-Domain Requests in GWT with JSONP

GWT Exclude Package From Source Path

Problem The Google Web Toolkit Java to JavaScript transpiler is a powerful tool to convert Java source code into JavaScript files. Unfortunately, not all Java code can be transpiled into JavaScript code by GWT. Sometimes, a project contains a mix of Java code that can be converted into JavaScript and Java code that doesn't. In that … Continue reading GWT Exclude Package From Source Path

GWT Object Serialization with gwt-storage

Problem The built in Java Serialization and various serialization frameworks available for Java allow to serialize Java objects conveniently into binary or textual representations. Unfortunately, most of these frameworks are not available for Google Web Toolkit client applications. There is no easily available built in solution for serializing GWT objects into text on the GWT client side. … Continue reading GWT Object Serialization with gwt-storage

GWT RPC Serialization for LocalStorage

GWT RPC is a great technology for sending 'Java' objects from a Java sever to a JavaScript client and vice averse. Since GWT RPC provides facilities for serializing and deseralizing Java objects, it seems like a good option, too, for preparing objects to be stored in a browsers LocalStorage. Unfortunately, the devil lies in the … Continue reading GWT RPC Serialization for LocalStorage

Something other than a Java object was returned from JSNI method

Google Web Toolkit allows building powerful bridges between the world of Java and JavaScript using so called JS overlay objects. However, these overlay objects can become it bit tricky if it is not certain what the type of objects passed from JavaScript will be. Wait? Types and JavaScript? Yes, but only the most fundamental ones … Continue reading Something other than a Java object was returned from JSNI method