tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Chheda <>
Subject Re: User tracking/monitoring
Date Mon, 01 Jun 2009 19:31:02 GMT
I had to add   
<%= request.getSession().getId()%> 
for it to display the sessionId. 

 Can you elaborate on what the side effects would be to display the full sessionId as compared
to just the session route?

From: Tim Funk <>
To: Tomcat Users List <>
Sent: Monday, June 1, 2009 11:54:26 AM
Subject: Re: User tracking/monitoring

The snippet I post was the snippet.  (if you are using jsp) But it can have security side
effects. A safer snippet might be this:

<%@ taglib uri="" prefix="fn" %>
${(fn:split(, '.')[fn:length(fn:split(, '.'))-1])}

Which splits the session id apart by '.' and typically - the last part of the session is the
jvmroute (aka the server which served the request)

Anyone with knowledge of JSTL should have no problem incorporating the above snippet. If you
have trouble with the above - seek a trusted consultant for help. The money will be well spent.


Chetan Chheda wrote:
> Thanks Tim and Chuck. 
> Tim, 
>  Is this something a novice programmer like me can add to our Footer.jsp file? Can you
add your recommendation to a code snippet , I would really appreciate it. 
> Chuck, 
> Can you tell me more about 2? How would the sessionId be displayed in the page with that
method? Can you demonstrate that to me with a small example? 
> 3 wont work as most of the users are business users and designers who are not that savvy.

> Thank you so much! Chetan

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message