You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael McCutcheon <mi...@att.net> on 2011/02/08 08:41:57 UTC
How to hookup Servlet 3.0 Authentication to realm? (request.login)?
Hello,
I'm attempting to setup my web app to authenticate via the new Servlet
3.0 HttpServletRequest.login method.
I have a JDBC realm set up in the context.xml in Netbeans 7. Now I'd
like to use the request.login method to authenticate against that realm.
The problem I'm having is that I get the error message:
javax.servlet.ServletException: no authenticator
When I call the login method.
How do I get the login method to use my JDBC realm?
What am I missing?
Do I need something in web.xml?
Or do I need to declare something special on the servlet that calls the
login method?
Do I need a <login-config> section? If so, What should it be populated
with?
thanks for any help,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: How to hookup Servlet 3.0 Authentication to realm? (request.login)?
Posted by Michael McCutcheon <mi...@att.net>.
On 2/8/2011 11:46 AM, Mark Thomas wrote:
> On 08/02/2011 07:41, Michael McCutcheon wrote:
>> Do I need something in web.xml?
> Yes.
>
>> Or do I need to declare something special on the servlet that calls the
>> login method?
> No.
>
>> Do I need a<login-config> section? If so, What should it be populated
>> with?
> Yes. I'd just configure it as BASIC.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
I was able to make it work. I had to put a <security-constraint> in the
web.xml, and that seems to have triggered Tomcat to setup an authenticator.
thanks,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: How to hookup Servlet 3.0 Authentication to realm? (request.login)?
Posted by Mark Thomas <ma...@apache.org>.
On 08/02/2011 07:41, Michael McCutcheon wrote:
> Do I need something in web.xml?
Yes.
> Or do I need to declare something special on the servlet that calls the
> login method?
No.
> Do I need a <login-config> section? If so, What should it be populated
> with?
Yes. I'd just configure it as BASIC.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org