Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help to read JNDIRealm inforamtion from my application.xml file in Tomcat

 
chandra yalla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can any one tell me , how can i read information related to LAP from realm in Servlets

give below is my realm information related Lap configuration in admin.xml file which is placed in location Tomcat5.0\conf\Catalina\localhost


<Context path="/museadmin" debug="0" privileged="true">

<Realm className="org.apache.catalina.realm.JNDIRealm"
debug="99"
connectionName="cn=manager,dc=Evolium,dc=com"
connectionPassword="secret"
connectionURL="ldap://localhost:391"
roleBase="ou=Groups,ou=OMC,dc=Evolium,dc=com"
roleName="cn"
roleSearch="(uniqueMember={0})"
roleSubtree="false"
userSearch="(cn={0})"
userPassword="userPassword"
userPattern="cn={0},ou=People,ou=OMC,dc=Evolium,dc=com"
/>

</Context>

i need to fetch the connectionURL,connectionPassword etc from above file in the Servlet to make a query to the LDAP.

i am will be very much thankfull if any one can give me some sample Java Code to how to access information from Realm tag in configuration file.

Thanks and Regards
Chandra
 
chandra yalla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have read the tomcat document , it says about how to configure the LDAP information , my problem is how to read that information from Server Code in my webapplication ( i have already configured that information which is working properly for authentication)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic