tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@apache.org>
Subject Re: User tracking/monitoring
Date Mon, 01 Jun 2009 15:54:26 GMT
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
View raw message