<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8855225815033065923</id><updated>2024-09-01T03:12:24.184-03:00</updated><title type='text'>Felipenasc-en</title><subtitle type='html'>Web Apps, Grails, Java, Spring, AJAX, GWT, ....&#xa;This is my blog in english.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://felipenasc-en.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://felipenasc-en.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8855225815033065923.post-5026014893436622224</id><published>2010-03-22T22:04:00.000-03:00</published><updated>2010-03-22T22:04:53.360-03:00</updated><title type='text'>GWT + Grails = Rock n Roll: Part 2 - Two separate projects talking JSON through RequestBuiler</title><content type='html'>This post is Part 2 of Grails + GWT = Rock n Roll series. You can see &lt;a href=&quot;http://felipenasc-en.blogspot.com/2010/03/grails-and-dates-automatic-binding-date.html&quot;&gt;Part 1 here&lt;/a&gt;. Part 1 showed how to create an application based on GWT and Grails. To join the two, I used Grails-GWT plugin.&lt;br /&gt;
&lt;br /&gt;
In this post today, after a few days reading about GWT and playing with the application created in Part 1, I decided to also try to develop another application with GWT + Grails, but this time without using the plugin. Thus, I could even decide if I prefer with or without the plugin. This post will show you how to create a solution composed of two separate applications, one GWT and the other Grails, communicating through the exchange of data using JSON.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Separating Grails and GWT in two distinct applications&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As described in Part 1, if you do not use the plugin and have two separate applications (one other GWT and Grails) instead, this means having to deal with the Same Origin Policy (SOP) in development time. In production it may be simpler. You could always find a way to get the HTML, CSS and JavaScript generated by the GWT compiler into the grails project (you could just copy and paste from one side to the other). But in development we have to deal with SOP in a way more productive than having to copy and paste from one side to another. The simplest way I found was using a &lt;a href=&quot;http://edwardstx.net/wiki/attach/HttpProxyServlet/ProxyServlet.java&quot;&gt;ProxyServlet&lt;/a&gt;, originally created by Jason Edward, and then evolved by Matt Raible. The source of this class I got from the project &lt;a href=&quot;http://raibledesigns.com/rd/entry/implementing_oauth_with_gwt&quot;&gt;Implementing OAuth with GWT&lt;/a&gt; created by Matt Raible. It is simple to use, and solves the problem easily. What it does in our context is:&lt;br /&gt;
- GWT application on the client side makes a request to the server;&lt;br /&gt;
- GWT application on the server side receives this request and forwards it to the Grails application&lt;br /&gt;
- Grails application receives this request and responds JSON&lt;br /&gt;
- GWT application receives this&amp;nbsp;JSON response and forwards it to the GWT client&lt;br /&gt;
&lt;br /&gt;
Thus we need not bother with SPO.&lt;br /&gt;
&lt;br /&gt;
Why do we need all this? After all, why do we want to have two separate applications (one other GWT and Grails)? Well, that ends up being a personal decision of each one, ok? But for me, I find it interesting to follow the standards of each project. A GWT project, as recommended, should be organized in a way, with a particular folder tree, etc. It may not be followed, but it is a recommended standard. So, why not speak the same &quot;language&quot; in chat rooms, discussion forums, new developers on the team, etc?&lt;br /&gt;
&lt;br /&gt;
In addition, separating the two projects leads to an interesting reflection on the conceptual architecture of rich applications for the web (RIA - Rich Internet Applications). By separating, you are literally, physically, implementing the SOFEA architecture (Service Oriented Front End Architecture). SOFEA was very well presented in the article &lt;a href=&quot;http://wisdomofganesh.blogspot.com/2007/10/life-above-service-tier.html&quot;&gt;Life Above the Service Tier&lt;/a&gt; (worth the read. The authors now have a group on this subject and have a website at: &lt;a href=&quot;http://ThinServerArchitecture.com/&quot;&gt;ThinServerArchitecture.com&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
In SOFEA applications, the whole&amp;nbsp;User interface&amp;nbsp;logic runs on the client side, in our case, the browser. The View and Contoller&amp;nbsp;layers&amp;nbsp;will have a project just for them (the GWT project). This is the most decoupled&amp;nbsp;Front-End &amp;nbsp;as it gets. This is interesting in my opinion, because then your server application turns out to have the sole responsibility to provide services for the Front-End (User Interface - UI). It seems like we&#39;re back to the concept of client x server, and somehow, we are, but a little different because it is a thin client, where only the user interface logic and flow of&amp;nbsp;navigation&amp;nbsp;control are on the client side. All other business rules are and should be on the server.&lt;br /&gt;
&lt;br /&gt;
Two other reasons for this separation into two applications are (these are from Matt Raible&#39;s blog &lt;a href=&quot;http://raibledesigns.com/rd/entry/packaging_a_sofea_application_for&quot;&gt;Packaging SOFEA Applications for Distribution&lt;/a&gt;):&lt;br /&gt;
- It may be simpler to work different teams each in a different project&lt;br /&gt;
- Each project can be versioned independently&lt;br /&gt;
&lt;br /&gt;
Well, after all these reasons, the fact is: I created a new application that consists of a GWT app responsible for the Front-End, and a Grails app for the Back-End (providing services,&amp;nbsp;remember&amp;nbsp;SOA?). Here things start getting even more cohesive and decoupled. Interesting results ....&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Communication using JSON&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For the communication between the Front-End and Back-End, I chose to use JSON. A grails app can &lt;a href=&quot;http://grails.org/doc/latest/ref/Controllers/render.html&quot;&gt;easily generate a JSON&lt;/a&gt; response, while GWT can easily &lt;a href=&quot;http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/json/client/JSONParser.html&quot;&gt;consume JSON&lt;/a&gt;. So, being a lightweight protocol to exchange data, and easily served and consumed by the GWT and Grails, I think JSON is a good choice. But if you prefer to work with XML, or other proprietary format, the decision is yours.&lt;br /&gt;
&lt;br /&gt;
Therefore, to create this new application, simply create a new GWT project, and another Grails project.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Application Front-End (GWT)&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I&#39;m using Eclipse with the plugin for GWT, therefore, to create a new project just click to create new GWT project in Eclipse. I created this&amp;nbsp;GWT&amp;nbsp;project called rockgwtfront, with the package com.rockgwt.front&lt;br /&gt;
&lt;br /&gt;
The&amp;nbsp;Eclipse wizard creates an EntryPoint class, the XML Configuration Module, and also creates an RPC service implementation. But we do not need this service for this example, therefore, you can delete the package com.rockgwt.front.server and package com.rockgwt.front.shared, and can also delete files GreetingService.java and GreetingServiceAsync.java from com.rockgwt. front.client&amp;nbsp;package. Then change the class Rockgwtfront.java to not use this service anymore. In the end, I got the EntryPoint&amp;nbsp;class&amp;nbsp;&amp;nbsp;below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; border-right: #999999 1px dashed; border-top: #999999 1px dashed; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 100%;&quot;&gt;&lt;code&gt;package com.rockgwt.front.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.Response;
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONException;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONValue;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;

public class Rockgwtfront implements EntryPoint {

    public void onModuleLoad() {
        final Button sendButton = new Button(&quot;Get Hendrix songs&quot;);
        final FlexTable songsTable = new FlexTable();

        // We can add style names to widgets
        sendButton.addStyleName(&quot;sendButton&quot;);
        
        sendButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                String hendrixSongsServiceUrl = GWT.getHostPageBaseURL();
                if(!GWT.getHostPageBaseURL().contains(&quot;rockgwt&quot;))
                    hendrixSongsServiceUrl += &quot;rockgwt/&quot;;
                    
                hendrixSongsServiceUrl += &quot;hendrix/songs&quot;;
                RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, hendrixSongsServiceUrl);
                builder.setTimeoutMillis(10000);
                builder.setCallback(new RequestCallback() {
                    
                    @Override
                    public void onResponseReceived(Request request, Response response) {
                        if (response.getStatusCode() == 200) {
                            
                            JSONValue v = JSONParser.parse(response.getText());
                            JSONArray songs = v.isArray();
                            if(songs != null){
                                updateBacklogItemsTable(songsTable, songs);
                            }
                            else{
                                throw new JSONException(&quot;O retorno nao veio como um objeto de Projeto&quot;); 
                            }
                        } else {
                            onError(request, new RequestException(response.getText()));
                        }
                    }
                    
                    @Override
                    public void onError(Request request, Throwable exception) {
                        Window.alert(exception.getLocalizedMessage());
                    }
                });
                try {
                    builder.send();
                } catch (RequestException e) {
                    Window.alert(e.getLocalizedMessage());
                }
            }
        });

        RootPanel.get(&quot;sendButtonContainer&quot;).add(sendButton);
        RootPanel.get(&quot;songsTableContainer&quot;).add(songsTable);

    }
    
    private void updateBacklogItemsTable(FlexTable songsTable, JSONArray songs) {
        songsTable.clear();
        for (int i=0; i&amp;lt;songs.size(); i++) {
            JSONObject item = songs.get(i).isObject();
            songsTable.setWidget(i, 0, new Label(item.get(&quot;name&quot;).isString().stringValue()));
            songsTable.setWidget(i, 1, new Label(item.get(&quot;album&quot;).isString().stringValue()));
        }
                    
    }
}

&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Note that the class above uses a RequestBuilder to perform the request to the server. RequestBuilder is a GWT class that can be used to make remote requests. With it, the requests are always asynchronous, ALWAYS. Here there is a callback object that will be called when the request comes back from the server. Then, this callback can do whatever it takes with the response received. In this case, I parsed the JSON response to work with the data returned. At the end, I just take this data and present them in a table, that&#39;s all.&lt;br /&gt;
&lt;br /&gt;
The GWT application expects a JSON return in the following format:&lt;br /&gt;
[( &quot;name&quot;: &quot;Hey Joe&quot;, &quot;album&quot;: &quot;Are You Experienced&quot;),&lt;br /&gt;
( &quot;name&quot;: &quot;Bold as Love&quot;, &quot;album&quot;, &quot;Axis: Bold as Love&quot;)]&lt;br /&gt;
&lt;br /&gt;
Therefore, it is necessary that the Grails application returns a JSON exactly in this format above.&lt;br /&gt;
&lt;br /&gt;
You must add the JARs needed by the ProxyServlet quoted above&amp;nbsp;to ~/rockgwtfront /war/WEB-INF/lib. So, add commons-fileupload-1.2.1.jar, httpclient-4.0.1.jar, and httpmime-4.0.1.jar to the lib (in the future we can manage this dependencies with Maven). Create the ProxyServlet&amp;nbsp;class. You can &lt;a href=&quot;http://static.raibledesigns.com/downloads/gwt-oauth-1.3.zip&quot;&gt;download &lt;/a&gt;the OAuth 1.3 and see the ProxyServlet there. Next, you must configure the web.xml to let it know that ProxyServlet exists. I mapped this proxyServlet for it to be run for every&amp;nbsp;/rockgwtback/*&amp;nbsp;request. See below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;

&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c40000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #383838; font-family: Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c40000;&quot;&gt;&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(153, 153, 153); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(153, 153, 153); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(153, 153, 153); border-top-style: dashed; border-top-width: 1px; color: black; font-family: &#39;Andale Mono&#39;, &#39;Lucida Console&#39;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 590px;&quot;&gt;&lt;code style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;web-app&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;servlet&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;servlet-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;RockServlet&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;servlet-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;servlet-class&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;com.rockgwt.front.servlet.ProxyServlet&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;servlet-class&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;init-param&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;param-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;proxyHost&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;param-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;param-value&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;localhost&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;param-value&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;init-param&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;init-param&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;param-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;proxyPort&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;param-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;param-value&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #1700ff; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;8080&lt;/span&gt;&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;param-value&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;init-param&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;init-param&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;param-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;secure&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;param-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;param-value&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;false&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;param-value&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;init-param&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;servlet&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;servlet-mapping&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;servlet-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;RockServlet&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;servlet-name&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;url-pattern&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;/rockgwt/*&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;url-pattern&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c40000;&quot;&gt;&amp;lt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;servlet-mapping&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;color: #00852e; font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;welcome-file-list&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;welcome-file&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;Rockgwtfront.html&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;welcome-file&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c40000;&quot;&gt;&amp;lt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;welcome-file-list&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace, &#39;Lucida Console&#39;, Monaco, fixed, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Monaco, &#39;Lucida Console&#39;, Monaco, fixed, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c40000;&quot;&gt;&amp;lt;&lt;/span&gt;web-app&lt;span style=&quot;color: #c40000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
Note that the servlet-mapping shows how&amp;nbsp;the url&amp;nbsp;should be requested by the GWT client. (/ rockgwt/*).&lt;br /&gt;
&lt;br /&gt;
For the Grails project, you can create a new app using the command line, or you can create a new one using Eclipse&#39;s STS (SpringSource Tool Suite). I created this grails app calling it rockgwtback. For this app, I created a controller called HendrixController that has the action &quot;songs.&quot; This action returns a list of songs from Hendrix. See below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(153, 153, 153); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(153, 153, 153); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(153, 153, 153); border-top-style: dashed; border-top-width: 1px; color: black; font-family: &#39;Andale Mono&#39;, &#39;Lucida Console&#39;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 661px;&quot;&gt;&lt;code&gt;package com.rockgwt.back.controller

class HendrixController {
    def index = { }

    def songs = {
        println &quot;chegou&quot;
        render(builder: &#39;json&#39;) {
                songs = array {
                       song name: &#39;1) Hey Joe&#39;, album: &#39;Are You Experienced&#39;
                       song name: &#39;2) Bold as Love&#39;, album: &#39;Axis: Bold as Love&#39;
                   }
        }
    }

}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Also changed the name of the application within the application.properties putting app.name = rockgwt&lt;br /&gt;
&lt;br /&gt;
That&#39;s it!&lt;br /&gt;
&lt;br /&gt;
Thus, we have a system running with Grails and GWT, independent of each other, but together forming our application. Here we miss a way to merge the two applications in production. Probably I would do it with Maven, so I have a single app in production.</content><link rel='replies' type='application/atom+xml' href='http://felipenasc-en.blogspot.com/feeds/5026014893436622224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://felipenasc-en.blogspot.com/2010/03/gwt-grails-rock-n-roll-part-2-two.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default/5026014893436622224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default/5026014893436622224'/><link rel='alternate' type='text/html' href='http://felipenasc-en.blogspot.com/2010/03/gwt-grails-rock-n-roll-part-2-two.html' title='GWT + Grails = Rock n Roll: Part 2 - Two separate projects talking JSON through RequestBuiler'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8855225815033065923.post-5938784844938903381</id><published>2010-03-12T11:35:00.000-03:00</published><updated>2010-03-12T11:35:43.032-03:00</updated><title type='text'>Grails and Dates: automatic binding a Date attribute from a custom formatted string</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #383838; font-family: Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Here is a small recipe for those who are not using the&amp;nbsp;&lt;a href=&quot;http://grails.org/doc/latest/ref/Tags/datePicker.html&quot; style=&quot;color: #fa7f42; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;DatePicker default Grails.&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The Grails comes with a tag that is g:datepicker.&amp;nbsp;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;It generates listboxes (comboboxes) for day, month, year, hour, minute and second.&lt;/span&gt;&amp;nbsp;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;You can even choose which of these comboboxes you want to generate.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;But there are times we do not want to use these combos, and just want a text field where the user can type the date in any format, such as dd/MM/yyyy or dd/MM/yy, or yyyyMMdd, or .. . ... or ... or&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Also, if you have an internationalized application, there may users with Portuguese Locale and input format like dd/MM/yyyy, or others with an English Locale and MM/dd/yyyy format.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Well, the goal here is to show how to configure Grails to use different input formats for dates, so it can parse automatically whenever you have an attribute of type Date in a domain object (or a Command object) that we need to bind from the parameters received in a POST (or GET).&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Here it goes:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1) User fills out a field input type = &quot;text&quot;, with a date in a format that you determine, ex: MM/dd/yyyy&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2) He/she sends this POST, which gets to your Controller and you have the params attribute&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;3) you want to&amp;nbsp;automaticaly &amp;nbsp;bind (let&#39;s say my domain object is Person, and in it there is a&amp;nbsp;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Date birthday):&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(153, 153, 153); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(153, 153, 153); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(153, 153, 153); border-top-style: dashed; border-top-width: 1px; color: black; font-family: &#39;Andale Mono&#39;, &#39;Lucida Console&#39;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 590px;&quot;&gt;&lt;code style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Person p = new Person(params) &lt;/code&gt; &lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For this to happen correctly, and its&amp;nbsp;&lt;i&gt;birthday&lt;/i&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;attribute be binded with a value of type Date, you must create a PropertyEditorRegistrar customized for you.&lt;/span&gt;&amp;nbsp;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Create a package in src/groovy, say com.myapp.editor and create there a PropertyEditorRegistrar:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #383838; font-family: Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(153, 153, 153); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(153, 153, 153); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(153, 153, 153); border-top-style: dashed; border-top-width: 1px; color: black; font-family: &#39;Andale Mono&#39;, &#39;Lucida Console&#39;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 590px;&quot;&gt;&lt;code style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;package com.myapp.editor; 
 
 import java.text.SimpleDateFormat; 
 import java.util.Date; 
 
 import org.springframework.beans.PropertyEditorRegistrar; 
 import org.springframework.beans.PropertyEditorRegistry; 
 import org.springframework.beans.propertyeditors.CustomDateEditor; 
 import org.springframework.context.i18n.LocaleContextHolder; 
 
 public class CustomPropertyEditorRegistrar implements PropertyEditorRegistrar { 
 
  def messageSource; 
 
  public void registerCustomEditors(PropertyEditorRegistry registry) { 
    registry.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat(messageSource.getMessage(&quot;dateFormat4y&quot;,null,&#39;dd/MM/yyyy&#39;,LocaleContextHolder.locale )),true)); 
  } 
 
 } 
 &lt;/code&gt; &lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Note that to work properly, you need to edit your grails-app/i18n/messages.properties (messages_en_US.properties, messages_en.properties) to have each one its correct setting.&lt;/span&gt;&amp;nbsp;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Ex for the &lt;i&gt;en&lt;/i&gt;:&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(153, 153, 153); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(153, 153, 153); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(153, 153, 153); border-top-style: dashed; border-top-width: 1px; color: black; font-family: &#39;Andale Mono&#39;, &#39;Lucida Console&#39;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 590px;&quot;&gt;&lt;code style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;dateFormat4y=MM/dd/yyyy &lt;/code&gt; &lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The next step is to register this PropertyEditorRegistrar in the grails-app/conf/spring/resources.groovy:&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(153, 153, 153); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(153, 153, 153); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(153, 153, 153); border-top-style: dashed; border-top-width: 1px; color: black; font-family: &#39;Andale Mono&#39;, &#39;Lucida Console&#39;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 590px;&quot;&gt;&lt;code style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;beans = { 
 
  customPropertyEditorRegistrar(com.myapp.editor.CustomPropertyEditorRegistrar) { 
     messageSource = ref(&#39;messageSource&#39;) 
  } 
 
 } &lt;/code&gt; &lt;/pre&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;That&#39;s it!&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Cheers&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://felipenasc-en.blogspot.com/feeds/5938784844938903381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://felipenasc-en.blogspot.com/2010/03/grails-and-dates-automatic-binding-date.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default/5938784844938903381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default/5938784844938903381'/><link rel='alternate' type='text/html' href='http://felipenasc-en.blogspot.com/2010/03/grails-and-dates-automatic-binding-date.html' title='Grails and Dates: automatic binding a Date attribute from a custom formatted string'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8855225815033065923.post-4011162353050648929</id><published>2010-03-12T11:21:00.000-03:00</published><updated>2010-03-12T11:21:14.712-03:00</updated><title type='text'>Grails: how to run different logic in production and development environments</title><content type='html'>There are times when we need to run different stuff depending on the environment the app is running on. For example, integration with external systems are sometimes simulated (mocked) in Development, and are executed for real in Production.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s a simple way to run one thing in Development and another in Production (or as many environments as you &amp;nbsp;need ...).&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;import grails.util.Environment; 
 
class MyController{ 
   Environment.executeForCurrentEnvironment { 
      production { 
         // Here goes the prod code
      } 
      development { 
         // Here goes the dev code
      } 
   } 
} 
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://felipenasc-en.blogspot.com/feeds/4011162353050648929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://felipenasc-en.blogspot.com/2010/03/grails-how-to-run-different-logic-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default/4011162353050648929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default/4011162353050648929'/><link rel='alternate' type='text/html' href='http://felipenasc-en.blogspot.com/2010/03/grails-how-to-run-different-logic-in.html' title='Grails: how to run different logic in production and development environments'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8855225815033065923.post-5262872200294355467</id><published>2010-03-09T19:03:00.001-03:00</published><updated>2010-03-22T17:06:25.220-03:00</updated><title type='text'>Grails + GWT = Rock n Roll: Part 1 - exploring a new world</title><content type='html'>Welcome to wonderful world of Rock n Roll. Rock bands, a lot of times, are &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;frowned upon by most traditional people.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Other times they are revered by young rebels.&lt;/span&gt; Doesn&#39;t matter. &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;The best bands, in the end, only do one thing: Rock n Roll.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;But what&#39;s it all about?&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;No doubt the music is the main product of this &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;rebel &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;factory.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Behind the people with tattoos, earrings and full of torn clothes, sometimes alcoholics and drug addicts, deep down there are musicians that &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;together&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; (and here&#39;s the most important: Together) are able to touch the souls hungry for pure and simple &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;rock&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; Ever heard a &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=pt&amp;amp;tl=en&amp;amp;u=http://skynyrd.com/v/CkTQUtx818w,lynyrd-skynyrdfree-birdbbc-1975&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhic1Cx5Mb8nbij_sNRH3gERTj2zMQ&quot;&gt;good Lynyrd Skynyrd&lt;/a&gt; with their 3 guitars, piano, drums, etc?&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; No doubt there is great musicality there.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt; Together they get  rock fans astounded even nowadays.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;After this &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;metaphorical &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;introduction, I will start today a series of posts about GWT and Grails, two technologies that together, for me, are emerging as the greatest rock band of recent times.&lt;/span&gt; &lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Grails is IMHO simply the best framework for web development in the java platform (at least those I know).&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;GWT (Google Web Toolkit), on the other hand, I&#39;m just a beginner, or rather curious.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; To be honest, I have been a little tired of dealing directly with HTML, CSS and Javascript, especially with the rise of Javascript that must be handled when developing AJAX applications.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; Even using libraries such as jQuery, or Prototype, anyway, it is a lot of JavaScript to handle.&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;Because of this (and other reasons), I think that GWT can be of great help.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;One of the major reasons is also the belief that I&#39;m getting that GWT can help a lot on having a decent architecture also in the View layer, not just the model, the controller, the DAO, etc..&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;If we look at an architecture of a traditional Grails application from the bottom up, we can see that:&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;The DAO is well resolved,&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;- Services are there and fulfill their role (transaction control, for example),&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;- The Controller also has its role as the boundary between our HTTP &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; world&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; and business rules/logic&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;-&lt;/span&gt; But then comes the View and we start to lose ouselves and make a mess with HTMLs, CSSs, Styles, JavaScript .js files, inline JavaScript, and so on.&lt;/span&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;I&#39;ve been studying a bit of GWT to understand more deeply and I&#39;m starting to believe that it can be used to more easily engineer a decent View layer.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; For example, you can use an MVP (Model View Presenter) with GWT.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; Anyone out there can say that you can also do so with JavaScript directly.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Yes, you may, but you can&#39;t deny that GWT makes things easier.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;First: It is JAVA!&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; You get tools, refactorings, debugging, and more.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; You also get the fact that GWT abstracts you from worldly concerns, such as obfuscation and minimization of JavaScript, to say the least.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;It&lt;/span&gt; does this for us.&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;So that&#39;s it guys.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Let&#39;s start ....&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt; I&#39;l write the posts in accordance with the adventure that I am going through.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; I have never developed a real application with GWT + Grails.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; So we will do so together.&lt;/span&gt; It w&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;ill be small, but let&#39;s go!&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;To start with, I installed the &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=pt&amp;amp;tl=en&amp;amp;u=http://code.google.com/intl/en/eclipse/docs/download.html&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhhtVJTojRqqoI6o-dKpK5UDORe9_w&quot;&gt;GWT plugin for Eclipse.&lt;/a&gt;&lt;/span&gt;  &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Also downloaded the &lt;a href=&quot;http://google-web-toolkit.googlecode.com/files/gwt-2.0.3.zip&quot;&gt;GWT SDK&lt;/a&gt; (currently I am using version 2.0.3 of GWT).&lt;/span&gt; D&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;ownload them all here: &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=pt&amp;amp;tl=en&amp;amp;u=http://code.google.com/intl/en/webtoolkit/download.html&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhjRJzwBQ0vD_kvCRpgYjnzTMGcvhQ&quot;&gt;http://code.google.com/intl/en/webtoolkit/download.html&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;I did a little experiment with GWT alone, without Grails yet.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;For this, I created a new GWT project using the Eclipse wizards that the plugin gives me.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;It creates a project already running from within eclipse, all beautiful.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;And this new project already has a small sample page, with a modal dialog, an Ajax request and everything.&lt;/span&gt; Al&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;l there for you to begin understanding  EntryPoint, GWT Modules, widgets and everything else.&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;So the first suggestion I give is this: play with the new application generated by the Eclipse plugin.&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;The first thing I noticed about applications with GWT is that everything is AJAX, I mean asynchronous.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;All communication with the server is asynchronous.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Then I saw that the application generated by the Eclipse plugin has a  different &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;layout&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; from a Grails application.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;So I get the first problem: how to join the two worlds?&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Well, in the end, GWT  only to generates HTMLs and Javascript.&lt;/span&gt; So&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; you can compile your GWT project, get the generated HTML and Javascript,  and copy to your Grails project, in web-app folder.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;Simple as that!&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;But that would not be productive.&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;So I questioned: how people gather around Grails with GWT?&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;They make a GWT project and another Grails project, and then join the two in some way (with maven for example)?&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Or they create just one project with it all?&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;And&lt;/span&gt; more... if they are two distinct projects, how to deal with the &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=pt&amp;amp;tl=en&amp;amp;u=http://en.wikipedia.org/wiki/Same_origin_policy&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhjuxr3T6dT1A1usY-55jniAdoEEBw&quot;&gt;Same Origin Policy&lt;/a&gt; (SOP)?&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;I saw that there are people who actually use the first solution, and people who use the second.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;For example, Matt Raible.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Since I was developing with &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=pt&amp;amp;tl=en&amp;amp;u=http://appfuse.org/&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhjT-SpcYJcde6YbLcg3lauLnDywcw&quot;&gt;AppFuse&lt;/a&gt; I&#39;m a fan of his.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; I learned a lot from the structure that he set for AppFuse.&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;And Matt uses the first solution?&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;He has two applications: one GWT and one Grails.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; Then, &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;in development environment&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; he has two apps running  simultaneously.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; And he deals  with SPO through a smart GWT &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; proxy&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;.&lt;/span&gt; The proxy receives requests form GWT client, forwards it to the Grails application, get back the response from it, and forward the same to the browser that has the GWT client.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; Very crazy, but it works. (at least this is what I understood he is doing)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;In production environment he actually puts them together.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; He has a smart Maven that does all this for him automatically, generating a single WAR that has the Grails and GWT client applications together.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Then the SPO problem disappears.&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;The other alternative is to gather everything together from scratch in a single application.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;To facilitate this,  &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=pt&amp;amp;tl=en&amp;amp;u=http://www.cacoethes.co.uk/blog/&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhjwHuCRygPfMtzEHKKi2BnyJDlKaA&quot;&gt;Peter Ledbrook&lt;/a&gt; created the &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=pt&amp;amp;tl=en&amp;amp;u=http://www.grails.org/plugin/gwt&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhgdT7R1FIvx2Y9mIjjI_Abz5ykuqQ&quot;&gt;GWT plugin for Grails&lt;/a&gt; (do not be fooled by this page. The plugin is now in version 0.5 and supports GWT 2.0).&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;I, for now, will follow this simpler &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;path&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; (always like the simplicity): I&#39;ll use the GWT plugin for Grails.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;It seems so simple now ...... but I got a couple of weeks to reach this conclusion.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;And so far I wanted to understand why Matt Raible does not use the plugin.&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; Maybe it is bad for some reason.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;If so, I have not yet discovered the badness.&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;So my friend, here are the initial steps:&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt; - &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Installing the SDK GWT&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;-&lt;/span&gt; Create the environment variable GWT_HOME pointing to the root of the GWT SDK&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Install the Eclipse plugin for GWT&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Create a simple application using the GWT plugin for eclipse.&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Open the application in the browser using the URL displayed by Eclipse (with gwt.codesrv parameter in the URL - this parameter is what allows you to change the Java code and refresh your browser to see the change there immediately).&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;- Ensure that the GWT browser plugin is installed (it will popup asking you to be installed).&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Run this application and play around with &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=pt&amp;amp;tl=en&amp;amp;u=http://code.google.com/intl/pt-BR/webtoolkit/doc/1.6/DevGuideUserInterface.html&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhgk3StIvFlsttpKHycMuSgb3Yn0lQ#DevGuideUnderstandingLayout&quot;&gt;different layouts GWT.&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;That&#39;s it&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Now that you played with GWT a bit, let&#39;s join the two (GWT + Grails):&lt;/span&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Create a new Grails application with the command &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;grails create-app rockgwt&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- Go&lt;/span&gt; into it &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;(cd rockgwt)&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Install the GWT Grails &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;plugin &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; (using the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;grails install-plugin gwt).&lt;/span&gt;&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; I&#39;m using Grails 1.2.x and grails-gwt plugin 0.5&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Create a GWT Module with the command plugin &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;grails create-gwt-module com.rockgwt.RockNRoll&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt; - Create a host page for your GWT Module.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;I did this by creating a controller and one grails page, index.gsp, for this controller.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;This page is the one that will host GWT:&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;1) &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;grails create-controller com.rockgwt.controller.Principal&lt;/span&gt;&lt;/span&gt; &lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial;&quot;&gt;&lt;/span&gt;&lt;/span&gt;2) &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;grails create-gwt-page main / index.gsp com.rockgwt.RockNRoll&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial;&quot;&gt;(when this command asks you if you want to create the Controller, say no, because you just created it in the previous step --- I think the plugin does not recognize the Controller created inside apackage, whatever).&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Compile your module with the command &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;grails compile-gwt-modules&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: georgia;&quot;&gt;(it takes a little bit)&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- Run the&lt;/span&gt; Development Mode with the command &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;grails run-gwt-client &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;Note that it will open the application window of GWT &lt;b&gt;Development Mode&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Open another Terminal, go to your project rockgwt and run grails application (that&#39;s right, you have two things running: the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;grails run-app&lt;/span&gt; , and grails run-gwt-client).&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;Open the browser and go to the Home of your &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;GWT + Grails &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;application : http://localhost:8080/rockgwt?gwt.codesvr=127.0.0.1:9997&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;- &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;To guarantee success, simply click the Launch Default Browser in the Development Mode &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;window&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;.&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;- &lt;/span&gt;The address you want to access in the end will be your main controller:&lt;/span&gt;&lt;br /&gt;
&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;http://localhost:8080/rockgwt/principal/index?gwt.codesvr=127.0.0.1:9997&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;- Be sure to put this crazy parameter.&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;It&lt;/span&gt; is responsible for allowing you to change the Java code and give a refresh on the browser to see the changes immediately.&lt;/span&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;Now, open your class RockNRoll and leave it like this:&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;(this class is in your project rockgwt in src/gwt/com/rockgwt/client)&lt;/span&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;package com.rockgwt.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootPanel;

/**
* Entry point classes define &amp;lt;code&amp;gt;onModuleLoad()&amp;lt;/code&amp;gt;.
*/
public class RockNRoll implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {

final Button sendButton = new Button(&quot;Rock n Roll&quot;);

RootPanel.get().add(sendButton);
}
}

&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;Refresh your browser.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
UPDATE (3/8/2010):&lt;br /&gt;
&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;- Just to complete....... in order to use Eclipse, click the right button of the mouse on top of src/gwt and select Build Path&amp;gt; Use the Source Folder&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;- And finally right click the mouse on the project rockgwt and select the Google&amp;gt; Webtoolkit Settings, inside the wizard that opens, select the first checkbox that appears at the top:&quot;Use Google Web Toolkit.&quot;&lt;/span&gt;&lt;/span&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;So you have everything you need in the classpath of the application in Eclipse.&lt;br /&gt;
&lt;br /&gt;
Tks&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://felipenasc-en.blogspot.com/feeds/5262872200294355467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://felipenasc-en.blogspot.com/2010/03/grails-gwt-rock-n-roll-part-1-exploring.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default/5262872200294355467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8855225815033065923/posts/default/5262872200294355467'/><link rel='alternate' type='text/html' href='http://felipenasc-en.blogspot.com/2010/03/grails-gwt-rock-n-roll-part-1-exploring.html' title='Grails + GWT = Rock n Roll: Part 1 - exploring a new world'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry></feed>