Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jreed-cartago opened this issue Jan 17, 2024 · 1 comment

Comments

@jreed-cartago
Copy link

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
Copy link
Member

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 gwtproject/gwt#9863 thread, and the linked pull request that completed it.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants