Jacob Rhoden wrote:
I have recently discovered the tomcat manager can not only show a list
of sessions, but the "Gussed username" for that session. This is very
handy except it seems to read a session variable called "user" and
just displays it. Our session object called "user" is a class not a
string, show it displays things like "[EMAIL PROTECTED]".
I am now going to answer my own question because digging through the
source code got the answer quicker (: Tomcat searches the session for an
object of type Principal, and uses the .toString() method to read the
username. So if you have a session object called "user", make it extend
"Principal" and add a toString() method so it displays user information
in a nice format.
Happy session management! (:
Best Regards,
Jacob
--
_________________________________________________
Jacob Rhoden
Application Architect
Systems Development and Integration
University of Melbourne
Phone: +61 3 8344 2884
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]