Wednesday, August 21, 2013
WebCenter 11.1.1.8 Performance Analysis Feature
Read full article...
Friday, March 15, 2013
Configure Coherence for Oracle WebCenter Portal Framework Content Presenter Task Flow
This document is intended for WebCenter Portal Application administrators who have to improve performance by configuring Coherence cache for Content Presenter.
For more information about the Coherence Cache for Content Presenter have a look at the following link:
http://docs.oracle.com/cd/E21764_01/webcenter.1111/e12405/wcadm_documents.htm#BABHFCJH
Details
The Content Presenter and the Content Management Interoperability Service (CMIS) are delivered out of the box with in-memory Coherence cache. This cache is NOT enabled by default. You can enable it by adding the file content-coherence-cache-config.xml to the application class path of the WebCenter Portal Application. This guide describes how to configure the cache when you deploy applications based on WebCenter Portal Framework.
READ MORE…
Monday, June 11, 2012
Unresolved Web App Library References when Deploying Portlets
When you try to deploy your portlets to clustered environment and you get the following error message:
[06:06:17 PM] ---- Deployment started. ----
[06:06:17 PM] Target platform is (Weblogic 10.3).
[06:06:17 PM] Retrieving existing application information
[06:06:17 PM] Running dependency analysis...
[06:06:17 PM] Building...
[06:06:19 PM] Deploying 2 profiles...
[06:06:19 PM] Creating portlet producer application for deployment.
[06:06:20 PM] Deploying a WSRP producer.
[06:06:21 PM] Wrote Web Application Module to C:\Oracle\mywork\BaPoCPortlets\Portlets\deploy\portletwebapp1.war
[06:06:21 PM] Wrote Enterprise Application Module to C:\Oracle\mywork\BaPoCPortlets\deploy\portletapplication1.ear
[06:06:21 PM] Deploying Application...
[06:06:22 PM] [Deployer:149191]Operation 'deploy' on application 'portletapplication1' is initializing on 'WC_PortletProducer2'
[06:06:22 PM] [Deployer:149193]Operation 'deploy' on application 'portletapplication1' has failed on 'WC_PortletProducer2'
[06:06:22 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application portletapplication1 on WC_PortletProducer2.: Failed to load webapp: 'baportletcontext'.
[06:06:22 PM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: 'baportletcontext'
[06:06:22 PM] Caused by: weblogic.management.DeploymentException: Error: Unresolved Webapp Library references for "ServletContext@474257908[app:portletapplication1 module:baportletcontext path:/baportletcontext spec-version:2.5]", defined in weblogic.xml [Extension-Name: jstl, exact-match: false]
[06:06:22 PM] See server logs or server console for more details.
[06:06:22 PM] weblogic.application.ModuleException: Failed to load webapp: 'baportletcontext'
[06:06:22 PM] #### Deployment incomplete. ####
[06:06:22 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
To target shared library to the cluster you can do this by using the WLS Administration Console. You select the shared library from the deployment and then from the tabs select the target, there you can then select the cluster target or managed servers.
Which libraries are needed or used by standard JSR-286 Portlet developed with JDeveloper:
- wlp-wsrp-producer-core-web-lib
- wlp-producer-full-web-lib
- wlp-light-core-web-lib
- wlp-framework-common-web-lib
- wc-producer-web-lib
- oracle.portlet-producer.wsrp
- jstl
- jsf
Of course you may need also another libraries depending you which technology scopes you used when you develop your portlet application. The above libraries are the minimum for the standard JSR-286 Portlet.
Monday, May 21, 2012
Add Meta Tags in WebCenter Portal using only ADF
Developing with WebCenter Portal you may come to a point where you would like to add some custom meta tags inside the html header. There are a lot of approaches to do so, some developer are using JQuery for example, when the develop with Webcenter Portal. There is also another one method by just using ADF and JSF tags. You can do so by just modifying you Page Style and adding following code:
<af:document title="#{pageDocBean.title}" id="docrt">
<f:facet name="metaContainer">
<af:group id="metaContainer">
<trh:meta name="keywords" content="#{bindings.SEO_KEYWORDS}"/>
<trh:meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1"/>
</af:group>
</f:facet>
</af:document>
What is important to know here, if you want to have more then one meta data information you have to use af:group tag. This allows you to add more meta tags which will be then later render into the html header section.
Monday, April 30, 2012
Generic links for WebCenter–event better
I had a post last week, talking about how to create generic links in WebCenter Spaces, you can read HERE. There is actually even more easier way to generate the link without to use the all request variables by just using this:
#{facesContext.externalContext.requestContextPath}/spaces/#{spaceContext.currentSpaceName}
You can use this also on every ADF page, for example to generate URL for the ADF GoLink Component:
<c:set var="contextRoot" value="${facesContext.externalContext.requestContextPath}" scope="request"/>
<af:goLink id="home" destination="/#{contextRoot}/spaces/#{spaceContext.currentSpaceName}" >
cheers
Thursday, April 26, 2012
Create WebCenter Portal Custom Skin
Maybe one of the most common task is creating custom skin in WebCenter Portal. Every time you create a portal you mostly have to change the design to suite your customer branding. For creating custom skin inside the WebCenter Portal follow those steps:
- First create new CSS file under the SKINS folder like show bellow. This is very important, if the file is not under the skins folder you can not export it like portal resource.
- After you create the file export it as portal resource so that you can use it into the portal. To do so click on the file with the right mouse button and select Create Portal Resource.
- New window pops up, you can modify the names inside so that the properties should like this
- You can use now you custom selected skin inside the portal. Go to the Administration and select you new skin to be used, like shown in the screen bellow
- You can load now the portal home page and select some components for example using Firebug to identify they style classes and override them inside your skin.
Monday, April 23, 2012
Unable to open the General WebCenter Spaces Administration Page
IF you create new admin user into WebLogic Server and try to login into the WebCenter Spaces Administration Page you will realize that you will be not able to do it.
Basically such a problem comes when the default weblogic account is replaced by new one admin account but only giving the new account Administrative Proviliges in WebLogic Server will be not enough. If you have similar issue check to see if you may have the same misconfiguration. So here the steps how to fix the problem:
- Login into Enterprise Manager and then go to the WebCenter Spaces project and click on it
- From the drop-down configuration menu select Security->Application Roles
- You have to see screen like the one bellow. Note the Member which are allow to see the Default WebCenter Administration.
- In my case, my admin user was not inside the members list, so I had to add it. For that reason select the very first Role Name #Administator and click on Edit button:
- From the new window you can add new users, which will be able to access the administration.
Now you can go to the General WebCenter Administration Page by using the URL:
http://
host:port
/webcenter/spaces/admin
Friday, November 4, 2011
Custom Oracle WebCenter Portal Navigation Filter
When you work with WebCenter Portal navigation model you do not have the possibility to set the security there or to define which element which user or role for example is able to see it. You can go even farther and for example define some navigation model, which should be rendered based on ID naming convention.
To solve this issue in WebCenter you do have the possibility to develop custom navigation filter. This filter extends exactly the same interface like the custom catalog, this is the CatalogDefinitionFilter interface. This is the example code of how to do it:
import java.util.Hashtable;
import oracle.adf.rc.catalog.CatalogElement;
import oracle.adf.rc.spi.plugin.catalog.CatalogDefinitionFilter;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import oracle.adf.share.ADFContext;
import oracle.adf.share.security.SecurityContext;
public class NavigationFilter implements CatalogDefinitionFilter {
public NavigationFilter() {
super();
}
public boolean includeInCatalog(CatalogElement catalogElement,
Hashtable hashtable) {
// ExternalContext ectx =
// FacesContext.getCurrentInstance().getExternalContext();
System.out.println("----!!!---Custom navigation filter");
System.out.println("----!!!---Custom filter value: " + catalogElement.getId());
if ("home".equalsIgnoreCase(catalogElement.getId()) || "pages".equalsIgnoreCase(catalogElement.getId())) {
System.out.println("----!!!---This is the home page");
return true;
}
if (isAuthenticated()) {
System.out.println("User is authenticated, his name is: " +
getCurrentUser());
for (String role :
ADFContext.getCurrent().getSecurityContext().getUserRoles()) {
System.out.println("role " + role);
}
SecurityContext sec = ADFContext.getCurrent().getSecurityContext();
if (sec.isUserInRole("baRole")) {
System.out.println("--!! Yes USER is in ROLE");
return true;
}
}
System.out.println("----!!!--- Non of the above get out");
return false;
}
// is the user authenticated
public boolean isAuthenticated() {
return ADFContext.getCurrent().getSecurityContext().isAuthenticated();
}
// get current user
public String getCurrentUser() {
return ADFContext.getCurrent().getSecurityContext().getUserName();
}
}
Now this example of custom filter shows you some technics you can use inside, to choose if some navigation is able to render or not. For example using this you can approve if the user is authenticated
public boolean isAuthenticated() {
return ADFContext.getCurrent().getSecurityContext().isAuthenticated();
}
or you can check if the user has the specific role to load this navigation model:
SecurityContext sec = ADFContext.getCurrent().getSecurityContext();
if (sec.isUserInRole("baRole")) {
System.out.println("--!! Yes USER is in ROLE");
return true;
}
Also inside this filter you have access to the ID’s of the elements into the navigation model:
so you can also check for example if specific ID should be rendered or not:
if ("home".equalsIgnoreCase(catalogElement.getId()) || "pages".equalsIgnoreCase(catalogElement.getId())) {
return true;
}
Knowing this you can bind for example security with element ID’s, or you can render navigation model element depending on the context path for example.
How to use this filter? Very simple, inside your navigation model put the name of the Navigation Filter class you implemented: <namespace>.CustomNavigationFilter, like shown bellow.
Tuesday, September 27, 2011
Exporting WebCenter Metadata using WLST
When you install Oracle WebCenter you get also some new functions inside the WLST which allows you to export the metadata. To use this functions you need to do the following:
- Go to the location where your Oracle WC was installed. The default folder is Oracle_WC1
$ORACLE_WC1/common/bin
- Start the wlst.sh script inside. This will initialize a session with the newly installed functions. If everything was running well you will see a screen similar like the one bellow.
- Now you can connect to the WebLogic Server domain by executing the following:
connect('weblogic', 'welcome1', 't3://127.0.0.1:7001')
I use the Pre-Build Virtual Machine for Oracle WebCenter Portal, which you can download here.
- Export WebCenter Portal metadata from MDS using the following command:
exportMetadata(application='Portal_application1',server='WC_CustomPortal', toLocation='/u01/app',docs='/oracle/webcenter/**')
application- the name of the deployed application
server- managed server on which the application runs
toLocation- location where the exported metadata will be saved
docs- the sub tree of metadata you want to export. In our case everything under /oracle/webcenter/
You can use this for example to synchronize metadata between the WebCenter Portal and the JDeveloper, if for example some portal object, for example pages, where created in runtime mode.