技术开发 频道

使用WebCenter和JDeveloper开发JSF Portlet



四、发布JSF Portlet

    现在我们首先将JSF portlet发布到在WebCenter框架中预配置的OC4J中,并按着以下步骤为JSF portlet建立一个发布文件:

    1. 在Applications Navigator中选择Portlets工程,然后选择File->New。
    2. 在New Gallery wizard中,选择General->Deployment Profiles->WAR File,然后单击OK。
3. 指定"webapp1"作为发布文件名,然后单击OK。
4. 指定"portletsApp"作为WAR文件中的J2EE Web Context Root,然后单击OK
   5.
选择Tools->Start WebCenter预配置OC4J,然后在WebCenter OC4J对话框中单击Yes安装OC4J。如图3所示:




图3 开始WebCenter预配置OC4J
 
下面的信息将显示了WebCenter Preconfigured OC4J已经被安装:

Oracle Containers for J2EE 10g (10.1.3.1.1) initialized

    接下来,我们要使用WebCenter Preconfigured OC4J配置一个连接。在Connections view中。右击Application Server,然后选择New Application Server Connection。在这个模板中单击Next,指定LocalOC4J作为连接名,然后的选择Standalone OC4J 10g 10.1.3作为连接类型。单击Next,将默认的名子"oc4jadmin"作为用户名,并指定"welcome"作为密码。单击Next。将默认的"localhost"作为服务器名,并指定22667作为RMI端口。然后单击Next。

接下来单击Test Connection,然后单击Finish测试这个连接。到现在为止,我们已经使
WebCenter Preconfigured OC4J建立了一个连接。如图4所示:



 4 WebCenter建立的一个
Connection:

   
接下来,我们来发布在JSP portlet应用程序中建立的WAR包。右击webapp1.deploy,选择Deploy to->LocalOC4J。然后在配置应用程序窗口单击OK来为WSRP应用程序建立WSDL。并将JSP portlet应用程序发布到WebCenter Preconfigured OC4J中。
0
相关文章