Sunday, October 16, 2011

Weblogic : Disable Console and Enable it using WLST

In Big Companies where there are 100’s of weblogic instance ,it is not best practice to use Console to do weblogic administration.  However , it is WLST that is used to do day to day weblogic administration task.

So first let us disabled the console ,so it can’t be accessed.

Click the domain to go to following tab;

image

In Advanced section uncheck this box.

image

After restarting weblogic server you will not be able to access http://localhost:7001/console it will throw 404 Not Found Error.

Now let us say if you want to set this flag again then we must use WLST to set this flag again.

Go to WL_HOME\common\bin\wlst.cmd ( Weblogic Scripting Tool)

run the following command

//Connect to weblogic admin server
connect('weblogic','welcome1') 
//mark it for edit
edit()
//start the edit
startEdit()
//set the flag to true
cmo.setConsoleEnabled(true)
//save the changes
save()
//activate the changes
activate()


Please restart the server.



Now try to access the console and you will be able to access it.

No comments:

Post a Comment