We’ve explained the basic concepts about the Portlet container through different tutorials about Portlets and Portals here.
We have a lot of Open source Portal vendors like Apache Pluto, Liferay, Sakai, Jetspeed and many more. We also have closed source Portals like IBM WebSphere and Oracle Webcenter.
This tutorial is mainly aimed to help you getting started and deploying the first Portlet into Oracle Webcenter.
Contents at a glance…
- Oracle Webcenter Introduction
- Pre-Requisites for Oracle Webcenter
- Installing Oracle Webcenter
- Configure Weblogic Domain
- Verifying Installation
- Launching Servers
- Verifying Oracle Webcenter Installation
- Installing Oracle JDeveloper
- Extending Installed JDeveloper
- JDeveloper – Create Integrated Server
- JDeveloper – Create Webcenter Portal
- JDeveloper – Create JSR286 Portlet
- JDeveloper – Create WSRP Producer
- JDeveloper – Deploy Your Portal
- Summary
Oracle Webcenter Introduction
Before getting started installing Oracle Webcenter and using it to produce the first Portlet against its framework, it’s worth to take a look for the Oracle Webcenter’s Portal.
Practically, Oracle Webcenter is one of the Portals that compliant with the JSR-168/286 as it also provides a vast amount of Portlet types like Prebuilt Portlets (i.e. Portlets resulted in from the integration with other the oracle applications like Peoplesoft, JD Edwards and Oracle E-Business Suite), JavaServer Faces (JSF) Portlets, Custom Java Portlets (i.e. they’re standard Portlets that stands for JSR286), OmniPortlet – Declarative Portlet-Building Tool, Web Clipping Portlet – Is a browser-based declarative tool that enables the integration of any web application with a framework application, and many others.
Following below a figure shows you the different Portlet types and the different possible scenarios that could lead you for specifying a certain type of Portlet to be used.
As we’ve concentrated in our discussion onto Portlets development mission, and how can they be implemented inside an Oracle Webcenter Portlet container, considering that the most of Portlet containers have had implemented the Portlets likely using the same way with a little bit different in the deployments. Let’s going forward to install the Oracle Webcenter and see how it’s used willingly for achieving that.
Pre-Requisites for Oracle Webcenter
Before getting started installing the Oracle Webcenter, it should be clarify you the steps required for doing that as the Oracle documentation are too long with some scattered information would make the installing process so complicated. Following below steps should summarize you the way that we would go through to install Oracle Webcenter abstractly.
- Create Oracle Webcenter schema.
- Create Oracle WebLogic 10.3.5 (Oracle Fusion Middleware).
- Installing Oracle Webcenter Portal.
- Installing Oracle JDeveloper.
Let’s before getting jump into database schema creation locate the needed installation binaries and their valid releases for the installation process. Following below the required binaries for getting started the process:
- Oracle XE 11.2.0.
- Oracle Weblogic 10.3.6.
- Oracle Webcenter Portal 11.1.1.8.0.
- Oracle JDeveloper Studio 11.1.1.7.0.
- Oracle Repository Creation Utility 11.1.1.7.0.
Just one minor note here, at every time you would to install a software among these already listed above, you should accept the Oracle’s terms and conditions.
Create Oracle Webcenter Schema
Many of the Oracle Fusion components require the existence of Schemas in a database prior to installation. Oracle’s RCU utility would save your time and create all of these required Schemas/Tables on behalf of you.
Let’s see how we can use this utility for creating the all required Oracle Webcenter Portal’s database assets.
- If you’ve downloaded the RCU utility successfully, you’re likely getting a file called
ofm_rcu_win_11.1.1.8.0_64_disk1_1of1.zip
, so just unzip it into your storage to have a folder looks like this (As we’ve chosen D:/OracleWebCenter/rcuHome):
Make sure you’re having a proper installation of Oracle database into your machine, a proper installation should lead you into running listener and instance of oracle itself.
- Open your command console and navigate into your RCU unzipped folder, beneath BIN folder and type there rcu.bat to get a Repository Creation Utility welcome screen.
- Click next and fill in the database instance connection properties where you’re landing on.
- Click next and waiting until the RCU utility check its required Prerequisite.
- In case you’ve faced a Warning that’s relevant for database’s character set. Just ignore it or create a database instance with an AL32UTF8 character set. It’s probably you get another warning window that tells you that your database version isn’t supported, just ignore it.
- Waiting prerequisite phase to be finished, the result must look like below:
- Click Okay, and check the WebCenter Portal and all relevant components get selected directly, as you can notice below:
- Click next and set schemas password. We’ve set a one password for all schemas. This password will be used while configuring the Webcenter domain.
- Click double next to see Map Tablespaces that the utility creates.
- Click next and accept the confirmation.
- Waiting RCU utility while it’s creating mentioned Tablespaces.
- Click Okay.
- Click create and waiting the schema to be created.
Installing Oracle Weblogic 10.3.6 (Oracle Fusion Middleware)
Oracle Weblogic Middleware is required as Oracle Webcenter requested it to complete its installation. To install Oracle Weblogic Middleware, follow below steps:
- Select Oracle WebLogic Server 11gR1 (10.3.6) + Coherence + Package Installer software to be downloaded.
- Double click on the installed software to open the installation wizard.
- Click next, select create a new Middle Home and specify the Middleware Home directory. In case you already have had a Pre-installed Oracle Weblogic Middleware, just ignore it and make a new directory for this installation.
- Click next and make check box shown there unchecked as you won’t need any security updates. Click a sequence of next until Oracle Weblogic Middleware installation get started as the information that you would see is just for checking.
Installing Oracle Webcenter
After creating Oracle Webcenter Portal’s schema, it’s time to get Oracle Webcenter itself installed. However, we supposed that you are already downloading the installation binary of Oracle Webcenter.
The binary files of the Oracle Webcenter is very huge, as such it’s containing a four different disks folder. Look below
- Navigate into D:\OracleWebCenter\WebCenter_Installer_11.1.1.8\Disk1\install\win64 and double click on setup.exe.
- The installer asked you providing your JRE or JDK location.
- Waiting a while before wizard being displayed.
- Click next and skip software updates.
- Click next. The wizard will check your prerequisite automatically. Click next and determine the Oracle Middleware home and Oracle Home Directory. This directory should be the same directory you’ve created while installing the Oracle Middleware.
- The installer will detect the Weblogic server you’ve installed and it will list it for you to choose.
- Click next and install to start installation.
- Waiting the wizard until it’s finished its work.
- Click next and finish.
Configure Weblogic Domain
Running an Oracle Webcenter requires you to define your own domain, your domain can be configured by following below steps:
- Open your window menu and select Configuration Wizard.
- As we didn’t create a domain before, you must check the create a new Weblogic domain.
- Click next and make sure you’ve checked the components to be like below:
Be sure that you’re selecting only these figured out above.
- Click next and specify the domain name and location.
- Click next and specify the Weblogic Server name and password. We’ve used weblogic123 as a password.
- Configure server start mode and the used JDK.
- Click next and configure the JDBC component schema. Notice that you must provide only the password that you’ve set the same password that you’re providing while the RCU creates the Schema. We’ve already provided sys as a password above.
- Click next to start JDBC component schema examination.
- Click next and select Managed Servers, Clusters and Machines as optional configuration required.
- Accept the already provided managed servers components’ names, addresses and ports.
- Click next and bypass the cluster configuration by another next.
- Configure your machine by providing name, node manager listen address and node manager listen port.
- Click next and assign your managed servers into your machine. In order to start a Managed Server from the administration console, you must first create a machine, then associate the managed server with that machine.
- Click next and create.
- Wait until the installing process finished and don’t check the Start Admin Server.
Verifying Installation
As we have a lot of components that are downloaded and installed, it’s so good to have a big picture for what we’ve done till now. Figure below should show you the Middleware host and these components that are hosted on.
Launching Servers
Before getting started launching the servers that you’ve seen in the above figure, let’s start the admin console that will be used to manage the servers after then.
- From your main menu (Windows menu), just start your admin console.
- Access admin console home page by typing http://localhost:7001/console and enter weblogic/weblogic123 as username and password.
- Edit node manager configuration file by navigating into NodeManagerHome which is located under {WeblogicHome}\common\nodemanager and modify the file nodemanager.properties file to set the attribute StartScriptEnabled to true. This attribute is required for Managed Servers to receive proper classpath and command arguments.
- Start node manager by running into {WeblogicHome}\server\bin\startNodeManager.cmd. Node Manager will be used for managing all of your managed server by using the Admin server, otherwise you will be enforced to use the startManagedServer.cmd like below.
- Start your managed servers that are listed inside your Environment – Servers. Typically, the starting of all managed servers you’ve selected would be done through using of startManagedWebLogic.cmd command that’s located within your JournalDev domain.
- To start your WC_Spaces managed server, just navigate into your JournalDev domain directory through using of console and type D:\OracleWebCenter\Middleware\user_projects\domains\JournalDev\bin\startManagedServerWeblogic.cmd WC_Spaces http://localhost:7001. You may be asked for username and password, just use weblogic/weblogic123.
- To start your WC_Portlets managed server, just navigate into your JournalDev domain directory through using of console and type the same command above with using of WC_Portlet instead of WC_Spaces. You may be asked for username and password, just use weblogic/weblogic123.
- Follow the same way for starting both of WC_Utilities and WC_Collaboration. You may be asked for username and password, just use weblogic/weblogic123.
- Your node manager will notify your Admin Server about any managed servers that get started. In case you’ve faced a connection exception that results in using of IPv6 for notifying, just make sure you’re enforcing your Weblogic instances to use IPv4 by editing JAVA_OPTIONS and adding -Djava.net.preferIPv4Stack=true inside startManagedWeblogic.cmd and setDomainEnv.cmd, respectively.
Verify Oracle Webcenter Installation
To make sure that you’re getting proper installation for Oracle Webcenter, just type the http://localhost: followed with proper port like below:
Accessing of http://localhost:8888/webcenter
Enter weblogic/weblogic123 as username and password for getting logged in into Oracle Webcenter Portal.
Installing Oracle JDeveloper
After that, it’s time to get Oracle JDeveloper installed as it’s used for creating the different accompanies of Oracle Webcenter technology such as Portlet, Pages, etc. Following below the steps required for installing the Oracle JDeveloper.
- Make sure you are downloaded the JDeveloper binary file into your storage. It’s name is jdevstudio11117install.exe. Double click on it.
- Click next.
- The initial screen asks you whether you want to use already exist Middleware or you want to install it using a new Middleware. Choose create a new Middleware as this version of JDeveloper isn’t aligned with the already Oracle Weblogic Middleware that you installed it before. Remember the path of the installed JDeveloper as it will be used later on.
- Click a sequence of next until the wizard starts the installation.
Extending Installed JDeveloper
Before getting developed a HelloWorld Portlet you must configure your installed JDeveloper be able of providing a design time capabilities for the Webcenter Framework and services. Following below points that you should follow for getting JDeveloper ready to use:
- Download the required extensions based on your JDeveloper components releases. Installed JDeveloper is having the following extensions:
As our JDeveloper have the listed J2EE and Studio extensions, so you should download two additional extensions for Oracle Webcenter and they are:
- Details for Webcenter Framework and Services Design Time.
- Details for Webcenter Customization Framework Design Time.
Now,
- Install downloaded extensions (Both of them) into your JDeveloper by navigate into Help – Check Updates.
- Click next and finish. Important note, open your JDeveloper using Default Role as if you were selected any other role, you may won’t be able of installing the Oracle Webcenter framework extension.
- Now, you should be able of seeing the all projects that are related for Oracle Webcenter.
JDeveloper – Create Integrated Server
You need to create an Integrated Application Server for handling all normal tasks like, start server, stop server, deploying the applications, etc.
To create your server from within your JDeveloper you need to follow the below steps:
- Open your JDevelper.
- From View menu, choose Application Server Navigator. That should make the Application Server Pane be shown.
- On the Application Servers root node, Right-Click and select New Application Server.
- From the first window, select Integrated Server and click next.
- Name your server (JournalDev) and specify both of domain directory and Server instance like below.
- Click next and fill in administrator user’s username and password.
- Click next and finish.
- Make sure that your node manager is already started as you cannot control your managed server without it.
- Make sure that your server is started Right-Click on the created server and choose Start Server Instance.
JDeveloper – Create Webcenter Portal
According for JSR 286 & 186, Portlet isn’t a standalone component, in that, it needs to be embedded inside a Portal page for getting displayed.
The way in which you can create a Portal page is to create an Oracle Webcenter Portal application that may contains a lot of pages of type (jspx). It’s not important at this time to get much understand about Oracle Webcenter Portal application than the steps that help you getting one developed. Following below steps help you create one:
- From Application pane, select New Application.
- Name your application and specify your preferred package before getting Webcenter Portal – Framework Application selected.
- Click double next.
- Make sure you’re selecting the proper package as you may find two duplicate portal phrase.
- Click finish.
JDeveloper – Create JSR286 Portlet
To develop a JSR-286 Portlet using Oracle JDeveloper you need to follow the below steps:
- From Application Pane, choose New Application.
- Fill in your Application name, directory, package and the technology be used.
- Click next and accept the default Project Name, directory and Project Technologies.
- Click next and update your package as you may find additional portal phrase.
- Click finish.
- From Portlets project, create a new JSR286 Portlet by, Right-Click on Portlets, select New Portlets and select Standards-based Java Portlet (JSR 286).
- Click Okay, a window of General Portlet Information will be displayed. Fill in all your Portlet’s information like name, class, package and the preferred language.
- Click next and finish. As a result, you will see your Portlet binaries being shown inside the Projects pane.
Now, deployment time:
- Right-Click on the Portlets project and from Deploy menu select New Deployment Profile. From displayed Wizard, select Deployment Profiles and select WAR file.
- Click okay and name your profile (JorunalDevPortlet) to be referenced later on.
- Once you’ve named your Profile and Click okay, a new Wizard will be displayed.
- Fill in WAR File and the web application’s Context root.
- Click Okay.
- Right-Click on the Portlet project and from deploy menu use JournalDevPortlet.
- From Deployment Action Wizard, select Deploy to Application Server option.
- Click next and use your created integrated server, JournalDev and click next.
- From Weblogic options, make sure you’re selected Deploy to selected instances in the domain and select AdminServer (Make sure you’re Admin Server and node manager is running and also you have a running WC_Portlet and WC_Spaces).
- Don’t worry if you find your managed servers down, just make sure you are getting them up from the command line by using startManagedWebLogic.cmd as listed before. (Double check by visiting the console).
- Click finish, and wait until your Portlet application get deployed.
- Access your Portlet url that’s listed at the deployment console inside your JDeveloper or follow given convention by typing into your browser http://hostname:7001/yourContext.
- Open your WSRP Test page and ensure your WSRP v2 WSDL is working fine. It’s a common issue that your Weblogic has used an IPv6 for deployment purpose, such in case, make sure you’re enforcing it to use IPv4 by editing your D:\OracleWebCenter\Middleware\user_projects\domains\JournalDev\bin\startWebLogic.cmd and put set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.net.preferIPv4Stack=true instead of already current located there.
JDeveloper – Create WSRP Producer
For exposing your developed Portlet into your Webcenter portal, you should copy your WSRP WSDL link that look like http://192.168.1.100:7001/JournalDevPortlet/portlets/wsrp2?WSDL and create a Producer:
- Navigate into your Portal Application from the Application menu.
- Right-click on the Portal and select New.
- Choose Portlets from the left pane and WSRP Producer Registration from the right pane.
- Click okay, and fill in your producer name.
- Click next and paste the WSDL link that you’ve taken a copy from it.
- Click next and finish.
JDeveloper – Deploy Your Portal
Now, you have a Portlet, Portal and a Producer for your Portlet, so let’s complete what we have started before by deploying your Portlet into the home Portal page. Following below steps would help you getting your Portal up and running and your Portlet deployed and shown.
- Navigate into your home.jspx page.
- Open your Application Resources and drag your Portlet into your page, just like figure below.
- The JDeveloper would ask you if you want dragged Portlet to be added as an ADF or a Trinidad one, just use Trinidad Portlet.
- Right-click on your Portal application and deploy.
- Click next and choose your JournalDev server.
- Click next and choose Admin Server.
- Click finish.
- Wait a second to show the deployment configuration Wizard and click Deploy.
- Copy your application URL as it’s shown inside the deployment console and paste it into your browser to get your Portal displayed.
- Paste http://192.168.1.100:7001/JournalDevPortal-Portal-context-root into your browser and find your Portal’s home page contained your simple developed JSR286 Portlet.
Summary
As Oracle documentation is very hard to traverse and follow, this tutorial is just a trial into getting a full sample of how can you install and configure an Oracle Webcenter Portal and used it after then for deploying a simple trivial Portlet into one of its Portal page. Contribute us by commenting below and find source code to download.
No comments:
Post a Comment