[jcifs] Forwarding after authorization failure using NtlmHttpFilter

Jonathan D Trumbull Jonathan.Trumbull at abbott.com
Mon Mar 14 01:08:01 GMT 2005


Richard,

> You might be able to use the servlet error-page handling (i.e. declare
> an error page for 401 and see if that works).  NTLM is a bit weird
> though, since the server will send a 401 with the challenge as well as
> the authentication result; so the error page may trap that
> intermediate response and hiccup the NTLM handshake.

Doesn't seem to work.  I had no problems forwarding on other errors (500 & 
404) but I got the same blank page for the NtlmHttpFilter fall through...

--Jonathan





Richard Caper <rcaper at gmail.com>
03/12/2005 10:55 PM
Please respond to Richard Caper

 
        To:     Jonathan D Trumbull <Jonathan.Trumbull at abbott.com>
        cc:     jcifs at samba.org
        Subject:        Re: [jcifs] Forwarding after authorization failure using NtlmHttpFilter


> 
> To do this I needed to store a reference to the FilterConfig object 
passed
> in init() but that is about the extent of the 

You could also obtain the RequestDispatcher during init() and store
that; so rather than doing getServletContext()... etc. each failed
login, it would just do:
 
if (dispatcher != null) dispatcher.forward(request, response);
 

> missing something.  Does this modification cause any problems or is 
there an
> even simpler solution that I was too dense to see? 
> 

You might be able to use the servlet error-page handling (i.e. declare
an error page for 401 and see if that works).  NTLM is a bit weird
though, since the server will send a 401 with the challenge as well as
the authentication result; so the error page may trap that
intermediate response and hiccup the NTLM handshake.


-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list