Why does "request.getUserPrincipal().getName()" sometimes return a blank string?
Has somebody an idea, why the getName()
method of the UserPrincipal
sometimes provides an empty String? Most of the time it re开发者_如何学运维turns the correct user name but not every time.
This behaviour does occur randomly. I can start the application, run the command and it works. The next time I start the application and run the command (exactly the same way as before!) it does not work.
Any ideas?
The part where you say, "...start the application and run the command..." is unclear.
What precisely are the steps involved?
HTTP is a text-based protocol. If you capture and observe the requests and responses, I am certain you would observe a difference to which the behavior could be attributed.
My suggestion is to gather more detailed information to point you in the direction of the solution.
精彩评论