Saturday, August 25, 2018

Re: hwo to get the server working?



On Saturday, August 25, 2018 at 5:19:10 PM UTC+2, Mike O. wrote:
Hello,

I am new to GWT (but not to Java) and have no experience with servers.  I have downloaded GWT and am running the StockWatcher example.
I can change the example and recompile, but there is no server running.
In the attached image, the bottom right shows the lack of server and the upper middle shows the error when I hit send in the window.

Do I need to separately start a server (like tomcat) and link it to this project somehow?  Or am I merely missing an option/flag?
Are there step-by-step instructions?  Unless I missed it, the GWT instructions do not mention the server side.

Thank you,
Michael


If it helps, these are the exact steps I took:

1) New GWT Application Project - and fill in as on: http://www.gwtproject.org/doc/latest/tutorial/create.html
Note - I use the option: default SDK (GWT 2.7.0 - 2.7.0)

2) I compile (right-click on StockWatcher folder in Explorer --> GWT --> Compile) the example and the output is:
    Compiling module com.google.gwt.sample.stockwatcher.StockWatcher
        ...
       Compile of permutations succeeded
       Compilation succeeded -- 11.252s
    Linking into /home/<name>/eclipse-workspace/StockWatcher/war/stockwatcher
        Link succeeded
        Linking succeeded -- 0.207s

3) I then run (right-click on StockWatcher folder in Explorer --> Run As --> GWT Development Mode) the example and the output is:
    Turning off precompile in incremental mode.
    Super Dev Mode starting up
        workDir: /tmp/gwt-codeserver-1813876122864786922.tmp
        Loading Java files in com.google.gwt.sample.stockwatcher.StockWatcher.
        Module setup completed in 8634 ms
    2018-08-25 14:54:22.459:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
    2018-08-25 14:54:22.495:INFO:oejs.AbstractConnector:Started SelectChannelConnector@127.0.0.1:9876

    The code server is ready at http://localhost:9876/

You should use "GWT Development Mode with Jetty" instead (see https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/devmodes/DevMode.html)
 
4) I copy http://localhost:9876/ (or http://127.0.0.1:9876/) into a web terminal and copy the "Dev Mode On" and "Dev Mode Off" buttons into the toolbar

IIRC (haven't used Eclipse for a while), if you switch to the "Development Mode" view, you should get a different link, specifically it should be http://localhost:8888/
 
5) Follow the StockWatcher folder down into war/ and right-click on stockwatcher.html and open in browser (see image 1 attached)

6) Hit Enter on the stockwatcher.html window and get the error window appear

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment