[jcifs] RE: Authentication: NTLM
skeetz
skeetz at 8thdeadlysim.com
Fri Aug 16 04:29:35 EST 2002
Hey All,
Sorry it took so long for me to reply. I've been really busy with work and
a side project of mine.
>Q: How do you know from within your code where the WEB-INF directory is?
in jsp session.getServletContext().getRealPath("/") will get the root
directory of the site. But I think we are on the right path with the init
params and the filter.
>Q: If I have resin setup, am I ready to go to run JSPs? I never have before
(I don't think anyway).
Yep it's ready to go right out of the box. Just use a jsp file extension
and it will compile and run automatically.
>how to communicate error messages.
>From the filter you can always output through the ServletResponse object.
response.getWriter().println("Invalid login attempt");
I'd like to see what you are doing with the enumeration of parameters.
Where can I get your code?
skeetz
P.S. Michael, I'm on the list now so you don't have to CC me.
-----Original Message-----
From: Michael B. Allen [mailto:miallen at eskimo.com]
Sent: Thursday, August 15, 2002 4:00 AM
To: skeetz
Cc: jcifs at samba.org
Subject: Re: [jcifs] RE: Authentication: NTLM
On Sun, 11 Aug 2002 13:38:32 -0500
"skeetz" <skeetz at 8thdeadlysim.com> wrote:
> NEED TO MOVE PARAMETERS FROM CONFIG FILE TO INIT PARAMS
Ok, I have looked at your code and the servlet docs. I think I get the
idea. I made a jcifs.http.NtlmHttpFilter which is a merger of your
LoginFilter and NtlmHttpAuthenticator (little simpler). The NtlmHttpSession
still exists and will need to be available as an attribute for those who
wish to access SMB reasources (e.g. list directories or download files)
with the provided creds.
As for init-params, I just enumerate all of them in init() and put the ones
that start with 'jcifs.' into jcifs.Config. That makes every jCIFS property
an init-param.
The one problem with the login Filter is how to communicate error messages.
How are you supposed to indicate to the client that the login failed
because of one of 5 different SmbAuthException.getMessage() reasons? The
doFilter method is called by the container.
Will handle the POST issue next.
More information about the jcifs
mailing list