Adding Porlet into Webcenter Application

If you have portlets based on JSR 168 or JSR 286 and you want to add in webcenter 11g application.Oracle WebCenter Framework enables you to consume a portlet by registering its producer either with an application or with the Resource Palette from where you can add it to any application. After you register the producer, its portlets appear under the registered producer’s name under the Connections node in the Application Resources panel or in the Resource Palette.

For this you need to register WSRP portlet producer .If porlets JSR 168 is WSRP 2.0 enabled then it can be usable in webcenter 11g.

Register a WSRP portlet producer:

-> In the Application Resources panel of the Application Navigator, right-click Connections, choose New Connection and then choose WSRP Producer.
-> Use the Register WSRP Portlet Producer wizard , provide information and register .

Adding Portlets to a Page

Placing a portlet on a WebCenter Portal application page is a simple matter of dragging the portlet from the Application Resources panel or Resource Palette and dropping it on the page.
In the Application Navigator, open the application that contains the page (.jspx file) to which you want to add the portlet.
Under the Connections node in the Application Resources panel of the Application Navigator, or in the Resource Palette:
If the producer is a WSRP producer, expand the WSRP Producer node.
If the producer is a PDK-Java producer, expand the Oracle PDK-Java Producer node.

Expand the node for the portlet producer that contains the portlet to add to the page.Under the selected producer, all portlets contained by that producer are listed.
Drag the portlet from the producer node directly onto the page.You should drag the portlet onto a form on the page.

When you add a portlet to a page, a portlet tag (adfp:portlet or adfph:portlet) is added to the page source. This is the tag that represents the portlet component. This tag includes attributes that you can edit using the Property Inspector, or in the page source, to further control the behavior and appearance of the portlet.

The type of portlet tag used is determined by the following:

->If the project is configured for rich client components alone, the adfp:portlet tag is used.
->If the project is configured for Trinidad components alone, the adfph:portlet tag is used.

  <adfp:portlet value="#{bindings.FooterPortlet1_3}"
                            portletType="/oracle/adf/portlet/SamplePortlets_1257247466260/ap/E2default_ba133935_0124_1000_8008_0a093208e9fc"
                            id="portlet18" binding="#{backing_home.portlet18}"
                            displayHeader="false" width="100%"
                            renderPortletInIFrame="false"
                            displayScrollBar="false"/>


You can add the attributes by changing the source code or using property Inspector .

JSR-286/JSR-168 Portlet Compatibility

I had a application which is based on JSR 168 portlet.We need to deploy it on webcenter 11g. What are key things which we should keep in mind.

-> your JSR 168 portlet WSRP 1.0 or 2.0 enabled.
-> WebCenter can only integrate WSRP enabled portlets
-> Portlet needs to have the valid web service endpoint to act as a WSRP endpoint.

When you use Oracle Enterprise Pack for Eclipse to import JSR 286 portlets into an existing web application that contains JSR 168 portlets or portlet which is based on JSR 168 built in 10g enviroment– the existing portlet.xml is upgraded to the JSR 286 schema. (Note that if you import portlets manually, by editing the schema files, this upgrade will not occur automatically.) In most cases, the JSR 168 portlets will continue to work exactly as they did before.

The WLP JSR 286 portlet container invokes a JSR 168 compatibility mode for a portlet if either of the following are true:

The portlet.xml in which the portlet is defined has an XML namespace that does not contain portlet-app_2_0 (it is a JSR168 portlet.xml file). If a file exists in the web application named /WEB-INF/oracle-portlet.xml, the WebCenter JSR 168 compatibility mode is invoked; otherwise, the WLP JSR 168 compatibility mode is not invoked.The container runtime option com.oracle.portlet.compatibilityMode is set to owlp168 (WLP JSR 168 compatibility mode) or owc168 (WebCenter JSR 168 compatibility mode). This allows JSR 286 portlets and JSR 168 portlets from WLP and/or WebCenter to co-exist in the same web application.Any hide-portlet entries with a value of true will automatically be converted to a false value for the container runtime option com.oracle.portlet.offerPortletOverWsrp if no value for that container runtime option is specified in the portlet.xml file.

When you upgrade a 10g portlet producer application, the WebCenter migrator deletes oracle-portlet.xml and upgrades portlet.xml. It converts the navigation parameters stored in oracle-portlet.xml into public render parameters and adds them to portlet.xml. If weblogic-portlet.xml exists, it is retained as is.

The migration of a JSR 168 portlet producer application to JSR 286 is fully automated; it does not require you to perform any additional manual steps. However, based on the warnings that may be displayed in the log panel during migration, you may want to make additional changes to portlets. The following tables describe how various parameters in the oracle-portlet.xml file of a JSR 168 portlet producer application are handled in portlet.xml of a JSR 286 portlet producer application.In Oracle WebCenter 10g, Oracle JSF Portlet Bridge is based on and conforms to JSR 301, whereas in Oracle WebCenter 11g, Oracle JSF Portlet Bridge conforms to JSR 329.
In JDeveloper 11g, when you open for the first time an existing portlet producer application containing JSR 168 portlets, portlets are automatically upgraded to be JSR 286 compliant
. If the application is a portlet bridge application, it is further automatically upgraded to be JSR 329-compliant.

Happy coding with Techartifact

Build Portal with Apache Jetspeed2

Jetspeed is an Open Portal Platform, written entirely in open source under the Apache license in Java and XML.

Jetspeed allows to build your own custom portal based on jetspeed or to use base jetspeed.

You download out-box jetspeed from download, It comes with Jetspeed portal server and j2-admin(Jetspeed administrative portlet application)
Jetspeed out-of-box comes with tomcat5, but it can be deployed to any application server. Jetspeed can be deployed to any application server.

Jetspeed 2 is fully JSR-286 based portlet container.