Monday, August 27, 2018

Re: hwo to get the server working?

No problem, Mike. 

Jetty isn't a Java EE container, it's simply a servlet container. That means it runs your app with a very minimal set of built-in functionality and none of the Java EE functionality. Essentially, everything your app does, it must do itself, including authentication, database access, etc.. Your app must include the libraries for whatever type of servlet it uses. Essentially no services are made available to your app by the container. This is great if you're not even using Java EE, and are instead using some other Java web framework. Lets say you're using Spring, for example...

Maven, however, isn't related to Java EE. Maven is a type of java project that automatically loads its dependencies - you just list them in the pom.xml file - and builds or runs your application. Some of the features of Maven are also offered by eclipse/netbeans. I generally recommend beginners with Java actually start with a Maven project, however you might need some hints on how to integrate GWT. 

On Sunday, August 26, 2018 at 6:53:04 PM UTC-3, Mike O. wrote:

That is very generous, and if you have the time, I would certainly look at it.  That said, I am totally new to using IDEs (having programmed in text editors up to now) and although I have just spent some time since your email reading up on Maven, I don't know enough about servers (though I have used sockets) or IDEs to really understand the difference or make an good decision between them - I think I will stick with the jetty option on Eclipse for a bit - get to understand it, and then look into Maven.

If you have a minute though, I would be interested in hearing which Java EE features do not work with jetty.


On Saturday, August 25, 2018 at 10:07:14 PM UTC+2, Andrew Somerville wrote:
You can also run a local instance of your target server and set the noServer option on the gwt plugin. I do this using a maven project in NetBeans, for example, which has built in support for my target platform (wildfly, and previously glassfish). It's also impossible for my project to run on jetty to begin with since I'm using a wide range of Java EE features on top of basic servlets. 

The benefit of this is that you can run on a configuration nearly identical to your target platform and the application automatically re-deploys on save. The workflow is very smooth with no need to ever restart the server during normal development. Let me know if you want me to post additional details such as excerpts of my pom.xml showing how the project is configured. 

On Saturday, August 25, 2018 at 12:19:10 PM UTC-3, Mike O. wrote:

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,

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

1) New GWT Application Project - and fill in as on:
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
       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
        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@

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

4) I copy http://localhost:9876/ (or into a web terminal and copy the "Dev Mode On" and "Dev Mode Off" buttons into the toolbar

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
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment