tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Chheda <chetan_chh...@yahoo.com>
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. 

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



________________________________
From: Tim Funk <funkman@apache.org>
To: Tomcat Users List <users@tomcat.apache.org>
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="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
${(fn:split(pageContext.session.id, '.')[fn:length(fn:split(pageContext.session.id, '.'))-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.

-Tim

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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


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