Tuesday, May 8, 2012

Call Render Response phase from MBean or BBean



FacesContext.getCurrentInstance().renderResponse();

When this is required to be used?
When we have set immediate as true on a command component and want to skip the validation phase for a component.
http://docs.oracle.com/cd/E23943_01/web.1111/b31973/af_lifecycle.htm#CIAHCFJF
Above link also explains the use of autosubmit and immediate in few scenarios.

Partial Submit Vs Auto submit
https://blogs.oracle.com/jdevotnharvest/entry/partial_submit_vs_auto_submit

Sunday, May 6, 2012

Login issue after configuring LoadBalancing using Webcache

We configured loadbalancing between our two portal servers. After doing the configuration when we opened the URL for ohs server with url string attached for our application, we were successfully redirected to the login page of our application but we were not able to login into our application. However login was working when hitting direct application URL. The issue was with the session binding configuration. It requires the configuration to have JSESSIONID based login. So just set the JSESSIONID to be used for login.

Not able to login on portal and using any admin account

We faced an issue where we were stuck on the login page of our portal and also the for the oam, oim console as well. None of the username passwords were working. Looking at the logs gave an statement like "Invalid life cycle state.".... "Unable to connect to connection pool".... . The issue was the password for ODS user for oiddb schema was expired. The issue got resolved by changing the password for ods user. 

OAM Error page customization

We got a requirement to customize the error page of OAM thats comes when any unexpected error occurs or user reaches max session after login. The page that need to be customized is servererror.jsp page that can be find inside oam-server.ear file or we can find it in tmp folder of oam server under x-d-- (some name like this) folder. Provided that we got the license to customize the page, the changes can be done in the page under tmp folder or oam-server.ear file. The changes of the page inside tmp folder will be reflected without any restart, just by refreshing the page. We also need to delete the .class file ie the complied jsp file for servererror-jsp.class file.

However it may not be possible to customize the error messages that comes but still if u got the license to do that :) then you can find these messages inside serverMsg.class folder. Exact path can be found inside the jsp file itself.

On the similar path the other pages like Authorization error page (AuthZError), policy manager page can be customized that can be found inside oam-admin.ear file.

Tuesday, April 10, 2012

Common web.xml usages in Webcenter Portal Application

1) For Error codes like 404,401,400,500 or any other, we can redirect over application to an custom error page. The settings can be done in web.xml file as follows::

  <error-page>
    <error-code>404</error-code>
    <location>/error.html</location>
  </error-page>
  <error-page>
    <error-code>401</error-code>
    <location>/error.html</location>
  </error-page>

2) Session Timeout setting::


  <session-config>
    <session-timeout>15</session-timeout>
  </session-config>

3) Custom DataSource references::


   <resource-ref>
    <res-ref-name>jdbc/CustomDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
 

Tuesday, February 14, 2012

How to fetch operational attributes from LDAP

There are some attributes that are used by LDAP to populate the data by it self. These are not fetched by default using context adapter. We need to explicitly mention the attributes that we want to fetch. For this we can simply use the ldapTemplate search method or look up method. It may be better to go with search

ldapTemplate.search(Base,search Criteria, scope, operationalAttrbs[], contextMapper);

Friday, February 10, 2012

OIM Client: Some important methods

Today we had some requirements on creating password policies like for password expire, change password. After going through SPML web services, OIM client proved to e a useful api. It provided all the method for changing password, create user and many more. After creating password policy using OIM design console and applying those policies using usage object tab, it was quite handful to use oim clinet jar to call password reset and many other operations.