I've started taking advantage of GWT 2.5. The coolest feature of GWT 2.5 was the ability to write Java code directly in our HTML pages like so:
<script type="text/java">
String helloWorld = "Hello world";
Window.alert(helloWorld);
</script>
The trick is to use a ServletFilter
on the server side. This ServletFilter
uses the GWT compiler to compile this java code into Javascript and inject it into the HTML returned to the client.
I am unable to figure out how to filter this in web.xml
or how to pass information to the compiler. How can I do this?
Here is the Google I/O 2012 - The History and Future of Google Web Toolkit you are referring too. And here are the slides posted by Ray Cromwell.