java - Need to get the weblogic server username and password at runtime -
My application is posted in weblogic server. From within my application, I am starting a secure comfort service using HttpURLConnection . To safely invite the rest of the service, I have to pass a weblogic username and password. How do I get a weblogic username and password from inside my Java code?
You have to make a weblogic "references" and if you are a customer, then your user name / Set the password server side, a local reference is used:
weblogic.jndy Environmental environment = new weblogic Jandy. environment (); Environment.setInitialContextFactory (weblogic.jndi.Environment.DEFAULT_INITIAL_CONTEXT_FACTORY); Environment.setProviderURL ("t3: // myhost: 7001"); Environment.setSecurityPrincipal ("weblogic"); Environment.setSecurityCrendentials ("weblogic1"); Initial Content CTX = Environmental
You can access your & lt; Domain & gt; / Servers / & lt; Server name & gt; / Security
can get the user name / pass folder.
You can also get user name / pass by adding embedded LDAP within weblogic. Please see:
Comments
Post a Comment