Hello M. Manna,

I do think HttpSession.getAttributeNames(), HttpSession.getAttribute(name)
should be good enough for debugging your issue. You can have a look at the
good and classic examples servlet [1] included in every tomcat distribution.

If you want to be sure what server is serving your request you can print as
well the server's IP or hostname
using Inet4Address.getLocalHost().getHostName(). Or even simpler you can
add a system property like -Dserver.name=serverA and print it.

Hope it helps,

Luis

[1]
https://github.com/apache/tomcat/blob/master/webapps/examples/WEB-INF/classes/SessionExample.java









El lun., 10 feb. 2020 a las 0:32, M. Manna (<manme...@gmail.com>) escribió:

> Hello,
>
> I apologise in advance if the answer is obvious for this question. We are
> trying to investigate (in an isolated cluster) whether our session
> attributes are getting lost somewhere in the process.
>
> The issue is that we are setting it at a JSP Tag Level, however, when we do
> an AJAX request back to the same server, the session doesn't have the
> attribute set by the tag. Since it's two different servers, we would like
> to check using JMX whether this is present somewhere in session. Debugging
> has not resulted into a successful outcome.
>
> We appreciate if this is not possible, but just wanted to check if tomcat
> currently emits anything related to this.
>
> Regards,
>


-- 

"Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."

- Samuel Beckett

Reply via email to