gwt-plugins / gwt-eclipse-plugin

GWT Eclipse Plugin Documentation
http://gwt-plugins.github.io/documentation/
Eclipse Public License 1.0
114 stars 47 forks source link

Is it possible to update the Jetty to a version that supports Jakarta? #477

Open jreed-cartago opened 5 months ago

jreed-cartago commented 5 months ago

We us the GWT plugin for our development, and we are in the process of upgrading our web applications that use Jersey 3 which uses the jakarta.* packages, but from our understanding the GWT plugin currenlty uses a Jetty 9 which does not support jakarta. Is there a possibility to use a newer version of jetty, or is there a plan for an upgrade in the future?

niloc132 commented 5 months ago

The part of GWT that runs the built-in server is not in the eclipse plugin, but in GWT itself, and there is no plan to update that. In fact, the plan as of GWT 2.11 is to deprecate it (already done), and encourage developers to run their own server separately.

This works today in eclipse - if you weren't using GWT, how would you run your server so you could edit html/js/css while it is running? Once you have that real dev server running, tell DevMode (or CodeServer, if you prefer) where to build its output so that your dev server can see the output (using -war for DevMode or -launcherDir for CodeServer). Once this is done, start DevMode with -noserver to stop opening the extra port (no flag required for CodeServer, since it doesn't support this use case at all).

In the future there may be external server wiring that lets DevMode start your server, for tomcat/jetty/etc of each version. This would let those different versions be decoupled from GWT itself, so that GWT doesn't somehow need to bake in each possible version of each servlet container that someone might want to use. The mechanism to do this already exists in GWT - extend the com.google.gwt.core.ext.ServletContainerLauncher type and return a com.google.gwt.core.ext.ServletContainer instance when the server is started. This will almost certainly require some classloader trickery to keep your client code correctly separated from your server, but it is definitely possible to do. The better solution though is to have proper separation between your client and server code - separate classpaths, and run with separate processes.

For more information, check out the https://github.com/gwtproject/gwt/issues/9863 thread, and the linked pull request that completed it.

(Deliberately left open for a few days for any follow-up discussion).