GWT and Payara 6 – javax.servlet vs jakarta.servlet Compatibility Issue

13 views
Skip to first unread message

Pankaj Kumar

unread,
6:00 AM (11 hours ago) 6:00 AM
to GWT Users

Dear GWT Community,

We are currently upgrading our application to the latest GWT version using an Eclipse plugin–based, Ant-managed project.

After creating a sample GWT project and deploying it on Payara Server 6, we encounter deployment errors related to the Servlet API (javax.servlet).

After analysis, we observed that:

  • The latest GWT version still depends on javax.servlet

  • However, Payara 6 and newer Java/Jakarta EE versions require jakarta.servlet

Due to this mismatch, the application fails during deployment on Payara 6.

Could you please guide us .

Best Regards,
Pankaj Kumar
Java Developer

dav...@googlemail.com

unread,
10:08 AM (7 hours ago) 10:08 AM
to GWT Users
hi Pankaj

My project is currently using GWT 2.12.1

I create a servelet thus:: 

import com.google.gwt.user.server.rpc.jakarta.RemoteServiceServlet;

Everything *just works*

I'll take this opportunity to say what a fantastic job has been done over the years with GWT. My project was created early this century. I had my nose in an already out of date  GWT book (hard copy) and from that used some methods that were already deprecated. Nothing much has been altered over 20 odd years apart from upgrades to the GWT version. I cannot remember much hassle - fantastic job by the devs :-) I wish other projects would follow such a smooth path.

Colin Alworth

unread,
10:11 AM (7 hours ago) 10:11 AM
to GWT Users
Note that the one extra step to use the "...rpc.jakarta.RemoteServiceServlet" class is to replace your gwt-servlet artifact with the gwt-servlet-jakarta one. You'll naturally need to update your ant/eclipse configuration to point to these jars, first included in GWT 2.11.0 https://www.gwtproject.org/release-notes.html#Release_Notes_2_11_0
Reply all
Reply to author
Forward
0 new messages