Core Java

Weblogic Server Administration Tutorial

1. Introduction

Oracle Weblogic is Java EE application server that can be used to develop and deploy multitier distributed applications. Weblogic comprises of almost all services that are needed to develop and deploy an enterprise application. Administration of a Weblogic server for a production environment involves many tasks like creating and managing Weblogic clusters, and domain, deploying applications, configuration of webserver, managing transactions, JDBC security, JMS, and many more.

In this tutorial, we will learn how to create a basic Weblogic domain and deploy an application. We will be using a simple example application packaged as a web archive, to demonstrate how an application is deployed in Weblogic.

Weblogic domain is a unit which consists of inter-related server resources. The first part of the tutorial explains how to create s Weblogic domain using the configuration wizard.

2. Step by step procedure

Once you have Weblogic server installed, navigate to the $WLS_HOME/common/bin directory. WLS_HOME is the place where weblogic is installed. You need to run the config.sh script to start the configuration wizard. You can run the config script as ./config.sh

Domain Config Wizard
Domain Config Wizard: Create a new domain

Select the “Create a new domain” option and provide a location for your domain.

Doamin Config Wizard: Choose a template
Doamin Config Wizard: Choose a template

You can create a Weblogic domain from a template.

For this example, we will choose the Basic Weblogic Server Domain.

Domain Config Wizard: Choose a password
Domain Config Wizard: Choose a password

Provide a password for the domain.

Domain Config Wizard: Choose JDK
Domain Config Wizard: Choose JDK

We will be creating a development domain. By default, the console chooses the JDK that was used during the weblogic installation. If you want a different JDK, specify the location in this screen.

Domain Config Wizard: Finish configuration
Domain Config Wizard: Finish configuration

Click on Finish button to look at the configuration summary.

Domain Config Wizard: Create your domain
Domain Config Wizard: Create your domain

Click on Create to create your first Weblogic domain.

Domain Config Wizard
Domain Config Wizard

Click on Next.

Domain Config Wizard: Domain created successfully
Domain Config Wizard: Domain created successfully

Congrats! You just created your Weblogic domain. This screen shows you the domain location and the Admin Sever url which is usually http://localhost:7001/console.

Now, we have the domain created and we are ready to deploy our application in it. For this, you need to start the admin server from your domain location and log in into the administration console:

Navigate to the domain location which is usually $WLS_HOME/user_projects/domains/base_domain/bin. Start the admin server by invoking startWeblogic.sh script.

Wait until you see a meaasge on the console saying Notice WebLogicServer BEA-000365 Server state changed to RUNNING.

You can now access the admin server from any web browser. Type in the url http://localhost:7001/console

Weblogic Admin Console
Weblogic Admin Console

Type in the user name and password that you entered while creating the domain to log into the admin console.

Admin Console home page
Admin Console home page

After you login, click on the ‘Deployments’ link at the left hand side.

Install a deployment
Install a deployment

This page will show you the list of applications that are deployed in this domain. As of now, we have none. Click on the Install button to deploy an application.

Choose the app location
Choose the app location

Specify the path where the application is located. In my case, I have placed the application which is a war file in the domain folder. The applications under the specified path get listed below.

Choose the application you want to deploy. In my case, I will choose testing.war and Click on the Next button.

Choose deployment type
Choose deployment type

In the subsequent screen, choose to install the deployment as an application.

Name your app
Name your app

Give a suitable name to your deployment and hit the finish button.

In the next page, you will see that the deployment was successful and your application will be listed under the deployments tab.
Now, you can hit your application url, http://localhost:7001/testing and see that the application’s index page is served by Weblogic.

Application deployed on weblogic
Application deployed on weblogic

3. Conclusion

This tutorial concludes the first part of this series. We saw how to create a Weblogic domain and deploy an application into it. In the next part we will learn about integrating web servers and security.

Sandeep Sundaresha

I am a web application developer using java and J2EE technological stack. I graduated out of Visvesvaraya Technological University from Computer Science discipline. I am interested in data structures, and algorithms especially those involving graphs. Off late, I have developed interest in big data, and cloud services.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button