GWT 2.0 - Eclipse - Need to Recompile after every change

88 views
Skip to first unread message

ziggystardust

unread,
Dec 11, 2009, 7:46:23 AM12/11/09
to Google Web Toolkit
Been using GWT / App Engine and the Eclipse plugin for some time now
and just recently upgraded to 2.0. I reinstalled Eclipse (3.5),
installed the plugin and the sdks. Setup the example StockWatcher app
and everything runs fine. In dev mode however I have to recompile
whenever i make a change in order for it to be effective. Tried reload
and restarting the browser (IE and Chrome), tried restarting the
server but no joy. Any ideas appreciated. Thanks.

Luis Fernando Planella Gonzalez

unread,
Dec 11, 2009, 8:19:03 AM12/11/09
to Google Web Toolkit
Make sure you have ?gwt.codesvr=127.0.1.1:9997 at the end of the URL
in the browser.
That's what makes it use development mode.
Otherwise, it will just be the plain old web mode (now called
production mode).

ziggystardust

unread,
Dec 11, 2009, 8:36:59 AM12/11/09
to Google Web Toolkit
The gwt.codesvr extention is on the URL. I simply copy the suggested
given by the dev server and paste that into the browser. Problem
continues.

On Dec 11, 9:19 am, Luis Fernando Planella Gonzalez

Chris Ramsdale

unread,
Dec 11, 2009, 10:34:56 AM12/11/09
to google-we...@googlegroups.com
Are you able to hit breakpoints in Eclipse when debugging?

--

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Jaroslav Záruba

unread,
Dec 11, 2009, 12:32:42 PM12/11/09
to Google Web Toolkit
From time to time [eclipse.exe -clean] does the trick for me.

On Dec 11, 4:34 pm, Chris Ramsdale <cramsd...@google.com> wrote:
> Are you able to hit breakpoints in Eclipse when debugging?
>
> On Fri, Dec 11, 2009 at 8:36 AM, ziggystardust <camke...@gmail.com> wrote:
> > The gwt.codesvr extention is on the URL. I simply copy the suggested
> > given by the dev server and paste that into the browser. Problem
> > continues.
>
> > On Dec 11, 9:19 am, Luis Fernando Planella Gonzalez
> > <lfpg....@gmail.com> wrote:
> > > Make sure you have ?gwt.codesvr=127.0.1.1:9997 at the end of the URL
> > > in the browser.
> > > That's what makes it use development mode.
> > > Otherwise, it will just be the plain old web mode (now called
> > > production mode).
>
> > > On 11 dez, 10:46, ziggystardust <camke...@gmail.com> wrote:
>
> > > > Been using GWT / App Engine and the Eclipse plugin for some time now
> > > > and just recently upgraded to 2.0. I reinstalled Eclipse (3.5),
> > > > installed the plugin and the sdks. Setup the example StockWatcher app
> > > > and everything runs fine. In dev mode however I have to recompile
> > > > whenever i make a change in order for it to be effective. Tried reload
> > > > and restarting the browser (IE and Chrome), tried restarting the
> > > > server but no joy. Any ideas appreciated. Thanks.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>
> > .

ziggystardust

unread,
Dec 11, 2009, 1:50:26 PM12/11/09
to Google Web Toolkit
Luis' suggestion offered a clue to what is going on here and I have
managed to figure out what the problem is. The StockWatcher
application is expanded in the example to include a Google Accounts
login (i.e. LoginService). What this does is that when the module is
loaded it checks to see if the users has already logged in. If not it
refers them to the Google Accounts login and in development mode this
is simulated. When you pass the page for the URL which the accounts
login page should return to and it doesn't include the gwt_codesvr=...
reference you loose the ability to debug the application and make
changes on the fly after login. This is why I would have to constantly
recompile the app. When it returned from the login page without the
gwt_codesvr reference it was picking up the app form the war directory
which would have been stale.

I suspect Google needs to update the documentation for the
StockWatcher example. What I had to do is append
"gwt.codesvr=localhost:9997" to the login and logout URLs. See below

private void loadLogin() {
// Assemble login panel.
signInLink.setHref(loginInfo.getLoginUrl() + "?gwt.codesvr=localhost:
9997");
loginPanel.add(loginLabel);
loginPanel.add(signInLink);
RootPanel.get().add(loginPanel);
}


and


signOutLink.setHref(loginInfo.getLogoutUrl() + "?
gwt.codesvr=localhost:9997");

One needs to be careful hard coding these values though as they may
change if the browser is running on a machine tht is different than
where the development server is running or if using a different port
number.

Not sure if this is the best way to address this and if others have a
better suggestion I would appreciate it. I would consider this a
workaround at this point. Thanks Luis.


On Dec 11, 9:19 am, Luis Fernando Planella Gonzalez
<lfpg....@gmail.com> wrote:

Chris Ramsdale

unread,
Dec 11, 2009, 2:58:52 PM12/11/09
to google-we...@googlegroups.com
We'll definitely update the sample project and doc, thanks for the good find.

The workaround will in fact work, but I might add a check for the existence of the gwt.codesvr query param and, if present, add it's value to the redirect URL.

For example:

        String gwtCodeSvrParam = Location.getParameter("gwt.codesvr");
        
        if (!"".equals(gwtCodeSvrParam)) {
          signInLink.setHref(loginInfo.getLoginUrl() + "?gwt.codesvr=" + gwtCdeSvrParam);
        }



--

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.

ziggystardust

unread,
Dec 11, 2009, 9:37:15 PM12/11/09
to Google Web Toolkit
Nice suggestion. Thanks.
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>
> > .

Sorinel C

unread,
Dec 13, 2009, 4:24:45 PM12/13/09
to Google Web Toolkit
Why do you have to change your code to manage the "gwt.codesvr" crap ?
Do you know what's the 9997 port for?

...just use the "gwt.codesvr" in the URL of the browser when you
launch the "developer mode" and you'll have the same result ... the
point is that the 9997 is configurable and it can be changed, so what
do you do, you modify your code every time?

http://localhost:8080/MyApp.html?gwt.codesvr=localhost:9997

8080 is the default port for you app, 9997 is default the port for
dev mode... both of them can be changed!

Cheers,
Sorinel CRISTESCU
Reply all
Reply to author
Forward
0 new messages