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 boot.properties can get the user name / pass folder.

You can also get user name / pass by adding embedded LDAP within weblogic. Please see:


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -