Thursday, 31 July 2014

Change Default browser behavior language fallback in WPS8.5

When user locale is “es” (spainsh)and browser locale list is "es-cl", "en", "es", the portal ignores the entry "es-cl" and falls back to the second entry of "en". It recognizes that " es-cl " does not have a match among the portal defined locales and that the more generic version "es" of this locale is further down in the list after "en". This behavior conforms to the HTTP specification.

Below all labels are in English.

image

Websphere Portal has built-in language fallback servlet filter supports a mode that extends the language fallback behavior. If you enable this extended language fallback mode, the portal runs a fallback for all entries and removes duplicates of the fallback locales that are later in the list. In the example browser locale list of "es-cl", "en", "es" as given before, the portal recognizes that "es-cl" does not match any of the portal defined locales. Therefore, it runs a fallback to the portal defined locale "es". It uses "es" as the locale of choice and ignores the third entry "es" from the list. The resulting locale list that the portal uses is "es", "en". This fallback mechanism bypasses strict adherence to the HTTP specification of accepting and showing languages and uses the fallback option instead.

Steps to enable language fallback mode

1. Open the WebSphere Integrated Solutions Console.

2. Select the Resource Environment Provider WP ConfigService.

3. In the Custom Properties section, add the property engine.enableExtendedLanguageFallback and set it to the value true.

4. Save your changes.

5. Restart your WebSphere Portal for your changes to take effect.

image

After restart, system shows labels in Spanish

image

Tuesday, 29 July 2014

Supporting a new language in WebSphere Portal Server 8.5

By default, welsh language is not supported by WPS. To Support welsh follow the below steps:

Copy C:\IBM\WebSphere\PortalServer\doc\xml-samples\CreateLanguage.xml to local directory.

In CreateLanguage.xml, change the content as:

<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

type="update"

xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd">

<portal action="locate">

<language action="update" bidi="false" domain="rel" locale="cy">

<localedata locale="en">

<title>Welsh</title>

</localedata>

</language>

</portal>

</request>

Run the following XML to create the " Welsh " language by clicking the Administration menu icon in the toolbar, and then going to Portal Settings > Import XML.

image

Extract the resource bundles from PortalServer_root\ui\wp.ui\shared\app\wp.ui.jar into your local directory.

image

Copy all files in PortalServer_root\ui\wp.ui\shared\app\wp.ui.jar into local directory.

Files to change in local directory

LocaleNames_en.properties

button_en.properties

commonAdmin_en.properties

engine_en.properties

field_en.properties

pbruntime_en.properties

problem_en.properties

problem_short_en.properties

registration_en.properties

titlebar_en.properties

virtual_principals_en.properties

image

For welsh(cy) language to display in websphere portal ,change resource bundles file from en to cy in local directory

image

In engine_cy.properties

Change link.logout = Log Out to link.logout = allgofnodi

Copy all resource bundles from local directory into wp_profile_root/PortalServer/config/nls directory.

image

Restart Portal server

Login into WPS in Welsh locale.

image

Monday, 28 July 2014

Troubleshooting data for WebDAV with IBM WebSphere Portal 8.5

Enabling trace logging can be done either two ways.

Enabling Static tracing

1. Log into the Integrated Solutions Console as the WebSphere Application Server administrator.

2. Click Troubleshooting->Logs and Trace->WebSphere_Portal->Diagnostic Trace.

3. On the Configuration tab, ensure Enable Log is selected. On this same tab, ensure you increase the Maximum File Size and and Maximum Number of Historical Files as needed to ensure that the tracing of the problem recreation is not overwritten due to the amount of traffic on the system and output of the tracing itself.

4. Click Change Log Level Details and enter the following trace string:

com.ibm.wps.resolver.webdav.*=all:com.ibm.wps.logging.resolver.RequestResponseLogger=all:com.ibm.wps.engine.*=all:com.ibm.ws.security.*=all:com.ibm.ws.wim.*=all:com.ibm.websphere.wim.*=all:com.ibm.wsspi.wim.*=all

5. Click OK and save the changes.
6. Restart the WebSphere_Portal application server.

Enabling dynamic tracing
Dynamic tracing can be used for situations that do not permit a server restart.

1. Log in as the Portal administrator.

2. Click Administration->Portal Analysis->Enable Tracing. The Enable Tracing portlet appears.

3. Type the required trace string into the field Append these trace settings:

com.ibm.wps.resolver.webdav.*=all:com.ibm.wps.logging.resolver.RequestResponseLogger=all:com.ibm.wps.engine.*=all:com.ibm.ws.security.*=all:com.ibm.ws.wim.*=all:com.ibm.websphere.wim.*=all:com.ibm.wsspi.wim.*=all

4. Click the Add icon. Enable Tracing updates the field Current trace settings.
Note: Restarting WebSphere Portal will remove traces that were set by using the Enable Tracing Administration portlet.

Please refer this link

Exporting content from the Webdav in WPS8.5

You can download WebDAV resources as a zip archive using a web browser. To perform this task, enter a URI to the WebDAV resources you want to download as a zip archive into the web browser address bar.

This URI should be in the form of:

http://host:port/wps/mycontenthandler/dav/<entry point>/<path to resources>?mime-type=application/zip

Entry point for a Portal skin:

http://<host>:<port>/wps/mycontenthandler/dav/skinlist/<skin_dir>?mime-type=application/zip

http://localhost:10039/wps/mycontenthandler/dav/skinlist/ibm.portal.85HiddenPlus/?mime-type=application/zip

Entry point for a Portal theme:

http://<host>:<port>/wps/mycontenthandler/dav/themelist/<theme_dir>?mime-type=application/zip

e.g

http://localhost:10039/wps/mycontenthandler/dav/themelist/ibm.portal.85Theme/?mime-type=application/zip

Collect all themes and skins into a single zip file:

http://<host>:<port>/wps/mycontenthandler/dav/fs-type1/themes?mime-type=application/zip

Collect all files in WebDAV into a single zip file:

http://<host>:<port>/wps/mycontenthandler/dav/fs-type1?mime-type=application/zip

webdav-deploy-zip-file task in WebSphere Portal Server 8.5

This task uploads archive or compressed files to portal WebDAV folders.

Syntax: ConfigEngine.bat webdav-deploy-zip-file

Mandatory parameters to be specified on the command line or in the file wkplc.properties:

  • WasUserid The WebSphere® Application Server user ID
  • WasPassword The WebSphere Application Server password
  • PortalAdminId The portal administrator user ID
  • PortalAdminPwd The portal administrator password

Mandatory parameters to be specified on the command line only:

  • TargetURI The URI of the WebDAV folder where you want the archive or compressed file to be extracted.
  • The following two parameters are mutually exclusive:
    • ZipFilePath The file system path to the archive or compressed file. Do not use this parameter combined with the parameter ZipFileClassPath.
    • ZipFileClassPath The Java class path to the to the archive or compressed file. Do not use this parameter combined with the parameterZipFilePath.

Optional parameters to be specified on the command line only:

  • UpdateMode (=replace) The default value for this parameter is replace . If you want to merge the content of the archive or compressed file with the content that already exists at the given URI, set this parameter to the value merge . In this case files that do not yet exist are created, existing files are updated, and no files are deleted.
  • VirtualPortalContext or VirtualPortalHost Use this parameter to identify the virtual portal. Only pages contained in the specified virtual portal are refreshed. If you omit this parameter, by default no virtual portal page layout is refreshed.

Example:

./ConfigEngine.sh webdav-deploy-zip-file -DTargetURI=dav:themelist/mytheme/

-DZipFilePath=/tmp/mytheme.zip -DUpdateMode=merge

WebDav Theme Administration and Skin Administration in WPS8.5

For working with themes in an administrative perspective (such as creating a new theme, deleting a theme, modifying the title) connect by using the following WebDAV entry URL:

http://<server>:<port>/wps/mycontenthandler/dav/themelist/

If you want a specific theme rather than the full list of themes, you can add the friendly name, unique name, or object ID of the theme to the URL above.

For working with skins in an administrative perspective (such as creating a new skin, deleting a skin, modifying title) connect by using the following WebDAV entry URL:

http://<server>:<port>/wps/mycontenthandler/dav/skinlist/

If you want a specific skin rather than the full list of skins, you can add the friendly name, unique name, or object ID of the skin to the URL above.

Note: You can change title of theme or skin thorugh themelist or skinlist only ,since metadata.properties is found in that url.

dav/fs-type1/themes/Portal8.5/

image

dav/fs-type1/themes/Portal8.5/skins/Hidden/

image 

dav/themelist/ibm.portal.85Theme/

image

/dav/skinlist/ibm.portal.85Hidden/

image

WebDav Cache in WebSphere Portal Server 8.5

By default, all items under the themes ,skins, common-resources,layout-templates folder is cache for 86400seconds(1 day).

Caching information is stored in WP Config Service as key/value

Format is:

filestore.cache.expiration.id.re=regular expression

filestore.cache.expiration.id.seconds=value

theme cache

filestore.cache.expiration.0.re =themes/.*

filestore.cache.expiration.0.seconds=86400

skins cache

filestore.cache.expiration.1.re =skins/.*

filestore.cache.expiration.1.seconds=86400

common-resources cache

filestore.cache.expiration.2.re = common-resources/.*

filestore.cache.expiration.2.seconds=86400

layout-templates cache

filestore.cache.expiration.3.re = layout-templates /.*

filestore.cache.expiration.3.seconds=86400

image

All items of a certain resource type, such as jpg or gif have an expiration time of 6000 seconds:

filestore.cache.expiration.1.re=.*\.jpg|.*\.gif

filestore.cache.expiration.1.seconds=6000

All css files in the themes folder have an expiration time of 8000 seconds:

filestore.cache.expiration.2.re=themes/.*\.css

filestore.cache.expiration.2.seconds=8000