How do I use development mode on an external server via eclipse? GWT 2.0

166 views
Skip to first unread message

Stefan Sigvardsson

unread,
Dec 10, 2009, 5:13:41 AM12/10/09
to Google Web Toolkit
Hi!

In the previous versions of GWT i have been able to use hosted mode
against my external server this way
http://code.google.com/intl/sv-SE/webtoolkit/doc/latest/FAQ_DebuggingAndCompiling.html#How_do_I_use_my_own_server_in_hosted_mode_instead_of_GWT%27s

I just whitelistes the address and typed a different URL in this view
http://code.google.com/eclipse/images/gwt_launch_settings.png

Now the URL field has been removed in v2.0 (development mode).

I have to run it on the external server because that is where my XML-
RPC web service and database are.

Help? Please?

fmk11

unread,
Dec 10, 2009, 7:20:20 AM12/10/09
to Google Web Toolkit
Hi,

I use an external Ruby server. What I do is to simply replace the
first part of the URL to point to my RoR server, and I leave
everything else the same. My RoR server just have to have the HTML
host page from where my GWT app is loaded. So the original Dev Mode
URL looks like:

http://localhost:8888/Green_door.html?gwt.codesvr=192.168.1.100:9997

... and I replaced it in Firefox to:

http://localhost:3000/welcome/dashboard?gwt.codesvr=192.168.1.100:9997


Note that my server is running on http://localhost:3000, and that I
serve the host html page on /welcome/controller. This works fine for
me, reloads used to be slow on RC2 but are perfectly fine on the
recently released 2.0.0

I hope it helps.



On Dec 10, 8:13 am, Stefan Sigvardsson <scht...@gmail.com> wrote:
> Hi!
>
> In the previous versions of GWT i have been able to use hosted mode
> against my external server this wayhttp://code.google.com/intl/sv-SE/webtoolkit/doc/latest/FAQ_Debugging...
>
> I just whitelistes the address and typed a different URL in this viewhttp://code.google.com/eclipse/images/gwt_launch_settings.png

Thomas Broyer

unread,
Dec 10, 2009, 8:38:11 AM12/10/09
to Google Web Toolkit


On Dec 10, 11:13 am, Stefan Sigvardsson <scht...@gmail.com> wrote:
> Hi!
>
> In the previous versions of GWT i have been able to use hosted mode
> against my external server this wayhttp://code.google.com/intl/sv-SE/webtoolkit/doc/latest/FAQ_Debugging...
>
> I just whitelistes the address and typed a different URL in this viewhttp://code.google.com/eclipse/images/gwt_launch_settings.png
>
> Now the URL field has been removed in v2.0 (development mode).
>
> I have to run it on the external server because that is where my XML-
> RPC web service and database are.
>
> Help? Please?

Just provide the -startUrl argument (in the Arguments box in the
"Launch as Web Application" dialog):
-startUrl http://myotherserver/path/to/my/page.html

Then GWT will add the appropriate ?gwt.codesrv=... argument to the URL.

fmk11

unread,
Dec 10, 2009, 8:47:52 AM12/10/09
to Google Web Toolkit
No, You do .. just make sure your Dev Mode server is running (from
eclipse), then add ?gwt.codesrv=... argument to the URL for your
external server and it should work.

Federico.


On Dec 10, 11:38 am, Thomas Broyer <t.bro...@gmail.com> wrote:
> On Dec 10, 11:13 am, Stefan Sigvardsson <scht...@gmail.com> wrote:
>
> > Hi!
>
> > In the previous versions of GWT i have been able to use hosted mode
> > against my external server this wayhttp://code.google.com/intl/sv-SE/webtoolkit/doc/latest/FAQ_Debugging...
>
> > I just whitelistes the address and typed a different URL in this viewhttp://code.google.com/eclipse/images/gwt_launch_settings.png
>
> > Now the URL field has been removed in v2.0 (development mode).
>
> > I have to run it on the external server because that is where my XML-
> > RPC web service and database are.
>
> > Help? Please?
>
> Just provide the -startUrl argument (in the Arguments box in the
> "Launch as Web Application" dialog):
>   -startUrlhttp://myotherserver/path/to/my/page.html

fmk11

unread,
Dec 10, 2009, 8:52:12 AM12/10/09
to Google Web Toolkit
Actually .. I did not test that .. it might work too.

The important bit is that GWT's Browser Plugin seems to relax SOP
restrictions on the browser so you can get your pages, data, css,
images, etc from your external server and at the same time the code
from the Dev mode server.

Rajeev Dayal

unread,
Dec 10, 2009, 11:15:51 AM12/10/09
to google-we...@googlegroups.com
This is exactly right - just add:


to the program arguments list. Note that the argument is "-startupUrl", not "-startUrl".


--

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.



Raziel

unread,
Dec 21, 2009, 5:17:04 PM12/21/09
to Google Web Toolkit
I added the -startup option, and although DevMode generates the
gwt.codesvr parameter, when pasting it into the browser I still cannot
get the breakpoints to work.

In my case my GWT application is part of another application, and this
one requires to go through a login page. Previously (i.e. GWT 1.7) I
specified the start URL to be the login page and then after logging in
I just needed to navigate where my GWT application was and from that
moment everything worked fine. Now, I specify the same URL (i.e. the
login page) as the start URL, copy the devmode generated URL and paste
it in the browser. But when I get to my GWT application and it loads,
breakpoints don't work.

Any idea?

Thanks

On Dec 10, 11:15 am, Rajeev Dayal <rda...@google.com> wrote:
> This is exactly right - just add:
>

>  -startupUrlhttp://myotherserver/path/to/my/page.html


>
> to the program arguments list. Note that the argument is "-startupUrl", not
> "-startUrl".
>
>
>
> On Thu, Dec 10, 2009 at 8:38 AM, Thomas Broyer <t.bro...@gmail.com> wrote:
>
> > On Dec 10, 11:13 am, Stefan Sigvardsson <scht...@gmail.com> wrote:
> > > Hi!
>
> > > In the previous versions of GWT i have been able to use hosted mode
> > > against my external server this wayhttp://
> > code.google.com/intl/sv-SE/webtoolkit/doc/latest/FAQ_Debugging...
>
> > > I just whitelistes the address and typed a different URL in this
> > viewhttp://code.google.com/eclipse/images/gwt_launch_settings.png
>
> > > Now the URL field has been removed in v2.0 (development mode).
>
> > > I have to run it on the external server because that is where my XML-
> > > RPC web service and database are.
>
> > > Help? Please?
>
> > Just provide the -startUrl argument (in the Arguments box in the
> > "Launch as Web Application" dialog):

> >  -startUrlhttp://myotherserver/path/to/my/page.html


>
> > Then GWT will add the appropriate ?gwt.codesrv=... argument to the URL.
>
> > --
>
> > 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%2Bunsubs cr...@googlegroups.com>

Raziel

unread,
Dec 21, 2009, 5:37:22 PM12/21/09
to Google Web Toolkit
I made it work. Apparently now DevMode only pays attention if the URL
that represents the request that loads the application has the
gwt.codesvr parameter. I hope there's another way to preserve the old
behavior where hosted mode was able to debug applications no matter
how they were loaded, as long as they were loaded. See my use case:
logged in to an application, and eventually navigated to my embedded
GWT application at which point hosted mode took over and debugging has
very intuitive.

Otherwise it will be very inconvenient, at least for me, since my
applications are loaded through links (for example), and now such
links have to be (somehow) decorated with the gwt.codesvr parameter.

Please tell me there's another way.

Reply all
Reply to author
Forward
0 new messages