This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Security and the fly likes authentication to support LDAP or database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "authentication to support LDAP or database" Watch "authentication to support LDAP or database" New topic
Author

authentication to support LDAP or database

Srinivas Akshinthala
Greenhorn

Joined: Mar 17, 2011
Posts: 4
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.
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

Howdy, Srinivas. Welcome to JavaRanch!

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?


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Srinivas Akshinthala
Greenhorn

Joined: Mar 17, 2011
Posts: 4
Hi Roberto
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.

Please help me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: authentication to support LDAP or database
 
Similar Threads
question about how to use LDAP in J2EE projects
Swing client communication...
Alternative strategies for authenticating against LDAP w/ JNDI
what's LDAP server
Migrating JAAS from JBoss to Websphere 6.1