官术网_书友最值得收藏!

Configuring Eclipse and OEPE

The next step is to configure the Eclipse IDE so it knows about Oracle WebLogic Server's installation, the domain we created, and PrimeFaces' shared library.

Linking WebLogic's runtime environment

First, we're going to tell Eclipse where to find WebLogic's runtime environment:

  1. Launch the Eclipse IDE by running the following command:
    $MW_HOME/oepe/eclipse
    

    Or open the shortcut created by the installation process.

  2. Enter /opt/packt/workspace on the Workspace Launcher screen.
  3. Open the Preferences screen using the menu – Window → Preference.
  4. In the filter field, type server, click on the Runtime Environment entry and then the Add... button.
  5. In the new window, type 12c in the filter field, select the entry Oracle WebLogic Server 12c (12.1.2) and click on Next.
  6. Fill the field WebLogic home with the path where you installed the server—$MW_HOME/wlserver—and the other fields should be filled automatically:
  7. Click on Finish to close this window and return to the Preferences screen.

Adding a reference to the PrimeFaces' shared library

Now we're going to set up the PrimeFaces shared library, so we can reference it from our projects:

  1. On the Preferences screen, type shared to filter the entries, and click on Shared Libraries.
  2. The list of configured shared libraries is going to show up. Click on Add... to insert a new one.
  3. On the pop-up window, type in the full path of your primeSL.war file, or find it using the Browse... button.
    Tip

    The location of the file is /opt/packt/etc/primeSL/primeSL.war if you're following the book's pattern.

  4. The information we entered in the MANIFEST.MF file will be shown along with the JAR files that compose the shared library:
  5. Click on OK to confirm the procedure, and then click on OK again on the Preferences window to close it.

Linking WebLogic Server's instance

In order to start and stop the server from within Eclipse, along other actions such as package, deploy, and debug applications using the environment, we must inform the IDE about WebLogic's configured domain and server. To accomplish this, perform the following steps:

  1. Navigate to Window | Show View | Other... and type server in the Filter field; now double-click on the Servers entry.
  2. The Servers tab is going to show up. Click on the No servers are available. Click this link to create a new server… link inside it to open the Define a New Server window.
  3. As we only have one runtime environment configured, Eclipse suggests it at the first screen. Just click on Next.
  4. Now, enter your domain path—the whole value of /$DOMAIN_HOME—and click on Finish. Here's the final configuration:
    Tip

    We left the Local server type on this screen, meaning that OEPE has direct access to the server. If you need to connect to a development server, for instance, Remote is the way to go. Remember that OEPE still needs to access WebLogic Server's modules and libraries to compile your projects, so a local copy of it must be present, even though you will deploy them to a remote server.

  5. The new server is going to appear at the Servers tab. Right-click on it and select the Properties entry from the context menu.
  6. On the Properties window, click on Weblogic then Publishing, and select Publish as an exploded archive from the Publishing mode group:
  7. Click on OK to close the window, and it's done.
主站蜘蛛池模板: 遂溪县| 化隆| 内乡县| 长子县| 汽车| 永川市| 屏南县| 马边| 荣昌县| 沧源| 平度市| 镇康县| 额尔古纳市| 八宿县| 枝江市| 雅安市| 曲水县| 泸溪县| 昌平区| 海淀区| 翼城县| 城步| 娱乐| 玛多县| 互助| 滦平县| 岱山县| 商城县| 望城县| 海口市| 诸暨市| 娄烦县| 渑池县| 南乐县| 荣成市| 方正县| 黑龙江省| 基隆市| 南溪县| 启东市| 离岛区|