On 03/06/2016 05:23, saurabh.su...@rbs.com.INVALID wrote:
> I want it to get the IP address in the Login module.
> 
> In JBoss 6 i got so:
> 
> 
> 1.        private String getIP() throws PolicyContextException {
> 2.          HttpServletRequest request = (HttpServletRequest) 
> PolicyContext.getContext("javax.servlet.http.HttpServletRequest");
> 3.          return request.getRemoteHost()
> 4.        }
> 
> In Tomcat ,  i get an error: IllegalArgumentException: No 
> PolicyContextHandler for key=javax.servlet.http.HttpServletRequest
> 
> When scanning, I found that there are only two keys: CallbackHandler and 
> SubjectHandler...
> 
> 
> Thanks for you answers!

The answer hasn't changed from when you asked this question two weeks ago.

<quote>
Unless you write some custom Tomcat code, no. You'd need to extend the
JAASRealm and the JAASCallbackHandler at a minimum.
</quote>

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to