Ok, I have made some findings about this which may cast some light:
I think Tomcat can't load correctly the web.xml configuration file when I use my custom authenticator method. I use this lines in web.xml to specify which authenticator module should be used:
I suspect Tomcat does not know that it must take into account "form-login-config" fields. My custom authenticator is just FormAuthenticator modified, so Tomcat should be configured in the same way. What do you think about this? How can I tell Tomcat to read the form-login-config fields?
Well, my own reply is wrong, as I can see if I put some logging traces... My CustomAuthenticator knows that login page is /login.jsp and error one is /error.jsp. So I'm back to my first post ... I have seen similar errors:
They are using a previous version of tomcat, I'm testing with JBoss 3.2.4 which ships with Tomcat 5.0.26.
Any suggestions? :)
Not sure what you are trying to do here but if writing a Custom Login Module is what you are looking for then in JBoss you need to add that to JBossAS/server/all/conf/login-config.xml
Look at wiki http://wiki.jboss.org/wiki/Wiki.jsp?page=LoginModule
I think we're talking about different topics. Let me explain a bit more...
A LoginModule seems to manage user identity and credentials once collected, but doesn't allow to control how you collect them. This is what we want to control and so we need to create a new Tomcat Authenticator (You know there are different authentication methods available in JBoss: BASIC, FORM, CLIENT-CERT, DIGEST). We are following the next procedure:
- Create a class extending AuthenticatorBase
- Register it in Authenticator.properties
- Modify web.xml of the web application adding the line (amongst others, of course):
At this point is where we get the error described previously. Do you know what can be causing it?
Thanks in advance,