I still didn't find a solution. We have reinstalled tomcat but nothing's changed.
@Jens I debbuged in DevTools and found that for the server A, there is a Post request containing a sessionId sent to it and intercepted by the service containing both methods. The same request is sent to the server B but doesn't contain a sessionId. I still didn't understand why. The same app is deployed and by the way we can only are using IE to access web pages.
So The sessionId is sent from both servers to the front. But only sent back to server A.
@Craig both servers are working and active.I have no idea about session replication, how do I check that?
This is for sure related to the server, it must be some config or maybe a security config?
Le vendredi 30 septembre 2022 à 03:50:53 UTC+2, ma...@craig-mitchell.com a écrit :
Your question lacks some details. You talk about two servers, but don't tell us if they are active-active, or just running one server at a time.If they are active-active, we'd need to know how you are doing your session replication between then servers.If you are only running one server at a time, then Jens reply is a good idea.I personally prefer to handle sessions myself, with a cookie and a memcache (yes, not really sessions at all), so I can easily scale. But that's just a little side note. :)Either way, this outside of GWT's responsibilities, but still happy to help.On Thursday, 29 September 2022 at 6:24:33 pm UTC+10 Jens wrote:Use your browser dev tools to inspect the network request. You should check if server B sends back a session id cookie and that this session id cookie is transmitted back to the server for the second method that does getSession(false). If it doesn't or the session is already invalidated (either through code or through session timeout configuration on server B) then getSession(false) will return null.-- J.dhia.xd...@gmail.com schrieb am Mittwoch, 28. September 2022 um 12:21:36 UTC+2:I have a gwt app that is running when deployed on tomcat on server AFor some reason the same app when is deployed on tomcat on a server B has a session issueWe have Method 1 and Method 2 inside a servlet that extends RemoteServiceServletWe have a method1 in which we do:this.getThreadLocalRequest.getSession(true).setAttribute("myuserid", myuserid)Then in a second method we dothis.getThreadLocalRequest.getSession(false).getAttribute("myuserid")which throws a null pointer exception as getSession retuns nullIt is strange as this only happens on the server BI have verified the tomcat config files like context.xml files and they are identicalI have printed currentThread.gtId() inside both methods and they are different but as said no issue on server A.
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 email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/5862b922-29f6-40ca-b3b4-344049011b31n%40googlegroups.com.