Installation Guide on Oracle WebLogic Server and Deploying Spring MVC app on it

Prabhakar Reddy
5 min readDec 18, 2018

--

In this post, I will guide you on how to install and deploy Spring MVC Web app on Oracle WebLogic Server. The post is written based on:-

. Spring MVC 4.x.

. Oracle WebLogic Server 12c (12.2.1.3).

Steps to install Oracle Weblogic Server 12.2.1.3

  1. Install the Oracle WebLogic Server Installers for Development.

2. Unzip the downloaded Oracle WebLogic Server folder.

3. Run command prompt as administrator.

4. Go to the directory which contains jar file.

5. Run the jar file using this command java -jar xxxxxxx.jar.

6. After completion of executing the jar file, the below screen will appear.

Welcome page

7. Select Skip Auto-updates icon.

Auto updates

8. Installation location is taken by default.

Installation Location

9. Select installation type as WebLogic Server.

Installation Type

10. Click on Next and then click on Install.

11. After completion of Installation process click on Next and Finish.

12. In the Oracle Fusion Middleware configuration window, select create a new domain and click on Next.

13. In Templates select Create Domain using Product Template and select the Basic WebLogic server.

Basic WebLogic Server Domain

14. In Administrator Account give the password and Confirm password.

15. Select Domain Mode as Development and JDK as Oracle HotSpot xxxx in Domain and JDK window.

Domain Mode And JDK

16. In Configuration Summary window select the base_domain location and click on create button.

17. In Configuration Progress window click on Next.

18. In End of Configuration window, the Domain Location and Admin Server URL are shown, click on Finish.

19. Go to your domain location and click on the startWebLogic windows command file.

20. After the server started, using console URL we can go to WebLogic server console page and log in using username and password.

Administration Console 12c

Steps to Deploy Spring MVC on Oracle WebLogic Server:-

1. In this post, I will package Spring MVC Web app and deploy it on WebLogic Server.

2. Take note that if you deploy Spring MVC on other servers such as Tomcat and Glassfish, you do not need to change anything on your Source code.

3. However, if you want to deploy it on WebLogic, you will need to add some configuration files to the source code prior to the packaging.

Add the configuration to the project:-

Adding weblogic.xml to WEB-INF. In the weblogic.xml file, you need to configure contextPath (context-root) for the application. In case I name it as /spring MVC. You can name as/if you want to use empty ContextPath.

Project Structure
weblogic.xml

Packaging Applications:-

Maven Clean:-

Maven Install:-

War file was created on the “target” folder of project.

Deploy on Weblogic:-

  1. Go to Domain Structure -> Deployments and click on install. Choose XXXXXXXX.war and click on next.

2. Select -> “Install this deployment as an application” and click on Next and in next window click on Finish.

3. Click on Save. The setting will be updated successfully.

4. You will see the test point → URL, Click on the link to run the application.

5. Spring MVC web application final output.

Download source code by using this URL….. https://github.com/prabhakarreddyn/SpringMVC.git

That’s all for Oracle WebLogic Server installation steps and Spring MVC web application deployment in Oracle WebLogic Server…

--

--