Tuesday, 6 January 2015

Using friendly URLs without state information


1. In the portal WP Configuration Service(REP), set the custom property friendly.redirect.enabled to the value false.

2.    In the theme, that you want configure, for short stateless URLs, set the parameter com.ibm.portal.theme.hasBaseURL to true.
           <?xml version="1.0" encoding="UTF-8"?> 
<request    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:noNamespaceSchemaLocation="PortalConfig_8.5.0.xsd"    type="update">
<portal action="locate">     
 <theme action="update" uniquename="ibm.portal.85Theme" >          <parameter name="com.ibm.portal.theme.hasBaseURL"                      type="string" update="set">true</parameter>      
</theme>   
</portal>
</request>

3.    Make sure that all generated URLs in the theme do not include the navigational state. In the default theme, you can do this step by modifying the navigation.jsp and sideNavigation.jsp, mobilenavigation.jsp

navigation.jsp(Must Update two copies of this file in two different location)

·PortalServer_root\theme\wp.theme.themes\default85\installedApps\DefaultTheme85.ear\DefaultTheme85.war\themes\html\dynamicSpots

· PortalServer_root\theme\wp.theme.modules\webapp\installedApps\ThemeModules.ear\ThemeModules.war\themes\html\dynamicSpots

sideNavigation.jsp

PortalServer_root\theme\wp.theme.themes\default85\installedApps\DefaultTheme85.ear\DefaultTheme85.war\themes\html\dynamicSpots

mobileNavigation.jsp

PortalServer_root\theme\wp.theme.themes\default85\installedApps\DefaultTheme85.ear\DefaultTheme85.war\themes\html\dynamicSpots

<portal-navigation:urlGeneration contentNode="${wp.identification[node]}" keepNavigationalState="false">  

No comments:

Post a Comment