Weblogic - Static Web Site Deployment

Card Puncher Data Processing


Java - Web Application (Web Module) - War in Weblogic

How to deploy a static website in Weblogic.


Create a Web Archive

  • create a WEB-INF directory at your web site root
  • add a web.xml in this directory
<?xml version="1.0" encoding="UTF-8"?>
    <display-name>My Web Site Name</display-name>
       A static web site
  • add also the weblogic.xml file that defines the context-root
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
  • Verify the structure of your website on the file system. It must be something like that:
  - page1.html
  - page2.html
  - script.js
  - ...........
      - web.xml
      - weblogic.xml

jar cvf path\to\myWarFile.war .

Deploy the Web Site into Weblogic

To deploy web application into weblogic, you use the weblogic.Deployer (See doc )

  • Undeploy if it was already deployed
java ^ 
  -cp "C:\fmw\wlserver\server\lib\weblogic.jar" ^
  weblogic.Deployer ^
  -undeploy ^
  -name myWebSite ^
  -username weblogic ^
  -password welcome1 ^
  -adminurl t3://localhost:9500
  • Deploy it (same as undeploy but you give the war file and change the action)
java ^ 
  -cp "C:\fmw\wlserver\server\lib\weblogic.jar" ^
  weblogic.Deployer ^
  -deploy ^
  -name myWebSite ^
  -username weblogic ^
  -password welcome1 ^
  -adminurl t3://localhost:9500
  -source path\to\myWebSite.war
REM You can also specified the target server with the targets options
REM   -targets bi_server1


The application can be seen in the weblogic console. Console > Deployment

If you open a browser and go to the following URL, you should see your website as you defined the index in the web.xml file


Example: http://localhost:9500/myWebSite

Weblogic Index Static Website

Share this page:
Follow us:
Task Runner