Wednesday, September 28, 2022

getThreadLocalRequest.getSession null

I have a gwt app that is running when deployed on tomcat on server A
For some reason the same app when is deployed on tomcat on a server B has a session issue

We have Method 1 and Method 2 inside a servlet that extends RemoteServiceServlet

We have a method1 in which we do:
this.getThreadLocalRequest.getSession(true).setAttribute("myuserid", myuserid)

Then in a second method we do
this.getThreadLocalRequest.getSession(false).getAttribute("myuserid")
which throws a null pointer exception as getSession retuns null

It is strange as this only happens on the server B
I have verified the tomcat config files like context.xml files and they are identical

I 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 google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/f468c396-d844-4b59-bc4a-cede7684e002n%40googlegroups.com.

No comments:

Post a Comment