I have 4 servlets sitting on a vm and all is well with them. I started rewriting an old servlet in Eclipse that I had started about 5 years ago using a different compiler and request.getRemoteUser() is returning null. I basically just started a new project and cut and pasted the old code into my Eclipse workspace, worked out the compile errors and tried to run it.
I don't think it is a server/tomcat security issue because the other servlets work fine.
Is there some setting in Eclipse that maybe I need to reset or something cryptic that would cause this?
getRemoteUser returns the user ID that the user logged in under. BUT only if that user was authenticated using the J2EE standard container security system.
If the webapp was not deployed in a J2EE security Realm, or if the webapp is using a non-standard security system, the webapp server will not process logins and will not capture and forward the user ID as part of the HttpServletRequest. In which case both getRemoteUser and getUserPrincipal will return null.
Most likely, if the other apps are working, there's an issue with this webapp's deployment context and specifically with its security realm configuration.
Customer surveys are for companies who didn't pay proper attention to begin with.
Yes, I think it's unlikely that Eclipse has anything to do with this.
Ping & DNS - updated with new look and Ping home screen widget
Joined: Jan 10, 2008
I'm confused. If I open another webapp on this server and log in, I can get in. If I open another, without closing the first one, I'm still logged in. When I open this one, I don't have to log in to get to the application, which is on a secure server, so it has to know who I am to open the page, yet it returns null for remote user.