This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a requirement that few users login through LDAP and few users are Login through database(Native),for this i developed Login page that username(j_username),password(j_password) and Login Type(type) fields.If iam select the Login type as LDAP and then press submit it is working fine,if i am select Login type as Database then press Submit it is first authenticated with LDAP and then it is going to database authentication irrespective of Login type as Native it is going to LDAP authentication.Please help me.
Champ, I'd kindly like to ask you to TellTheDetails. How's your environment? What's your server? Tomcat? How are you doing to switch between the types of authentication? How are your configuration files?
My Requirement is to authenticate the user either by using LDAP Or Native(Database),This is for when the LDAP Server is down the user can login through Native.(Some times the LDAP Server may be in down state).
My Environment is Struts,ApachedirectoryServer,Tomcat Server.
My Configuration in tomcat is:
In tomcat server.xml i replace the realm tag with the following code
I am attaching my Login jsp and My WebApplication Application web.xml
My Login jsp is:
My Application web.xml is:
Whenever Iam select LoginType as LDAP and click on Login button it is going to j_security_check of server(tomcat) it is fine but when we select LoginType as Native and Click On Login button then it is first going to j_security_check of server and then it is going to my /Dummy.do action irrespective of my selected Login Type.