> From: Tremal Naik [mailto:[EMAIL PROTECTED] 
> I want to retrieve the user principal where I don't have the request
> available i.e. I cannot use the method
> 
> HttpServletRequest.getUserPrincipal()
> 
> I need in particular the user name.
> 
> May you suggest something appropriate?

We got round this by putting the name into a ThreadLocal variable from a
place where we *did* have access to it, then reading it later - messy,
but it works, as Tomcat processes an entire request on the same thread.
Note that threads are re-used between requests, so make sure your code
can deal with that re-use.

There are probably better ways.

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to