Oracle WebLogic 12c建置靜態網頁

 最近正好在自己的電腦上嘗試安裝好Oracle WebLogic 12c,也試著安裝了Forms and Reports。

WebLogic既然可以部署和管理Web,應該也可以建置靜網頁。於是在網路上找了一下文件,依步驟設定後已成功,記錄一下。

1、建立新資料夾,如Static_Website,並且新增test.html

2、在資料夾Static_Website底下再新建一個資料夾,名稱為WEB-INF,並且新增一個web.xml,內容如下:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>Static HTML</display-name>
  <welcome-file-list>
    <welcome-file>test.html</welcome-file>
 </welcome-file-list>
</web-app>

3、在WEB-INF資料夾底下再新建一個weblogic.xml,內容如下,其中<context-root>是指定路徑:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
  <context-root>/test</context-root>
</weblogic-web-app>

4、到Weblogic Server主控台中開始部署





接著就都依預設值來進行,直到完成

5、完成部署後,需要將其啟動


6、打開瀏覽器,輸入URL,可以正常顯示test.html的內容





Windows 11安裝時跳過網路連線