This blog entry will describe how to extend your portal functionality using a taskflow deployed as a web app shared library (extend.spaces.webapp) . The pros and cons of this approach will be discussed in a subsequent post however some of the implications of deploying your functionality as a shared library are:
A dated A-Team discussion of the pros and cons can be found here. As additional background, there are several options available for adding functionality to your .8 WebCenter Portal.
The .8 WebCenter Portal application (formerly referred to as Spaces) provides a mature and robust starting point for your portal application development. While Custom Framework is still available, the Portal application has many features that aren't available in a Custom Framework application. While the steps for extending portal functionality are documented, this post will describe my experience and some of the design decisions.
At a high level, you must do the following:
Note: You MUST increment the PortalSharedLibrary Implementation Version defined in the MANIFEST.MF file. Failure to do so will generate an error when the spaces server is started preventing the application from running.
The steps for creating the workspace are straight forward. The workspace will contain 2 projects:

As illustrated in the project browser picture, a model project can be added as a dependency to the PortalExtension project. In other words, your Portal Extension conforms to ADF Development best practices. When you build and deploy the Portal Shared Library, you MUST increment the implementation version number located in the MANIFEST.MF file.
Note: Your application source will be developed in the PortalExtension project; no source goes in the PortalSharedLibrary project.
It's important to note that the PortalExtension project follows the same rules as any other ADF View project. There are no constraints therefore you can reference a model project and follow ADF Development best practices.
In the event that you wish to override items in the Portal Application deployment descriptors, you can add the entries to the PortalSharedLibrary project. For example, We added a web.xml file to the PortalSharedLibrary project where we disabled JS content compression to facilitate debugging by adding the org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION property.
Note: You must delete the public_html folder in the PortalSharedLibrary project to successfully deploy and test the PortalExtension project in the WebLogic Server embedded in JDeveloper. This folder will be present if you added a web.xml to override various properties in the webcenter application deployment descriptor.
During development, you will frequently unit test your Portal Extension. This is achieved by running the project on the WebLogic Server integrated with JDeveloper. Again, you must delete the public_html folder in the Portal Shared Library Project if you added web.xml deployment descriptor. Failure to do so will result in the following error:
<May 20, 2014 7:39:25 AM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: Failed to load webapp: 'RedstackPortalExtension-PortalSharedLibrary-context-root'
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)
...
Caused By: java.lang.ClassNotFoundException: javax.faces.webapp.ConverterELTag
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
The WebCenter Portal installation ships with an empty shared library called extend.spaces.webapp. The webcenter application has a library reference to extend.spaces.webapp defined in it's weblogic.xml. This library reference is the mechanism by which the shared library is merged with the webcenter application during deployment.
If you're organization is composed of multiple development teams, it's likely that each team will be working on different functionality. This functionality can be packaged as a conforming webapp shared library which must be referenced by the weblogic.xml deployment descriptor in the your custom PortalExtension project. In other words, develop your taskflows in standard ADF Web projects then package them as shared libraries. Create a single Portal Extension Workspace where you will reference the custom shared libraries you developed in the PortalExtension project weblogic.xml.
By default, the weblogic.xml is not added to the PortalExtension project therefore you must add it using the JDeveloper New File Wizard.
Note: The most important task to remember is to increment the implementation version in the Shared Library project MANIFEST.MF file. Failure to do so will prevent the WebCenter Application from deploying because of application assembly errors.
The steps for deploying a shared library to WebCenter Portal Domain are discussed here.
Extending WebCenter Portal .8 functionality is well documented and straight forward. The key things to keep in mind are:
Adding my personal experience on it.
Personally I do not like to add Task Flows or related code to them into the Portal Extension project. It can be something problematic and unmaintainable for large projects.
My personal recommendation it is only to maintain Servlets, Filters, Listener and Managed Beans in PortalExtension Project and separate always the Task Flows and Integration Projects in separated.
Thanks for sharing knowledge :).
Regards.