-
1. Re: Read content of login-config.xml at runtime
zeeman Oct 25, 2011 11:46 AM (in response to ramuvalivarthi)1 of 1 people found this helpfulWhat is your stack? Seam, jboss, etc...
If login-config.xml is on the classpath you can simply read it as an inputstream like
InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("login-config.xml");
If you use Seam solder, you can inject ResourceLoader. See Solder docs. Don't forget to mark this as answered if it answered your question.
-
2. Re: Read content of login-config.xml at runtime
ramuvalivarthi Oct 26, 2011 12:14 PM (in response to zeeman)Zeeman,
Thanks for prompt response, Iam using jboss,and initializing login-config.xml at server startup with ldap credentials as JAAS.once I entered in to the app server (Middle Tier), I don't want to write code again to connect ldap. I want to use same credentials which were mentioned in login-config.xml.
-
3. Re: Read content of login-config.xml at runtime
zeeman Oct 26, 2011 12:37 PM (in response to ramuvalivarthi)If you configured jboss security correctly you should be able to use security client in any part of your code. See this http://www.coderanch.com/t/475883/JBoss/Configuring-application-policy-login-config