I'm trying to write the following filter to get the user name and password after a user logs in, to store this as a session object and use the object to return user details. The problem is I can't seem to resolve the getRemoteUser method. I looked at the javax.servlet.http library and the method I need is right there, but it throws a 'cannot resolve symbol' error in the IDE (Netbeans). I always thought method classes loaded in the library can be resolved at compile time. Never seen this error before.
Why is it not possible to resolve the getRemoteUser method? Is incorrect to simply call this method using the HttpServletRequest request parameter like:
Sorry I'm not aware of how I'm ignoring the cast. I thought that by casting the parameter to type HttpServletRequest means that the parameter 'request' can use HttpServletRequest in the subsequent method call?
So would it be more appropriate to change the parameters so that I can use 'use' the cast like so?