Tailing WebSphere Portal Log Files in Microsoft Windows

Tailing the WebSphere Portal log files allows you to watch the logs in real-time as they role. In Unix or Linux it can be done with the command tail -f System.out.log, but there is no such command for Windows. Several tools are available which provide this functionality in Windows. The one I use is WinTail (WinTail.exe) from baremetalsoft.com.

Here’s how you can setup WinTail to watch your Portal log file.

Download WinTail.exe from the link given above. Put the executable in a permanent place where you’ll know where to find it because you may create shortcuts, which each point to a different log file. For example, you might make one point to the WebSphere Portal SystemOut.log file and you may make another which points to the debug trace file of a Web Experience Factory portlet that you’re working on. For example, I put WinTail.exe in my Program Files directory.

Next, create a shortcut and drag it to your desktop. Rename the shortcut to something logical like “Tail Portal Log”. Right-click on the shortcut and choose Properties from the context menu. In the target field of the Shortcut tab, place the path to your portal log file after the executable. For example:

"C:\Program Files (x86)\WinTail.exe" C:\IBM\WebSphere\wp_profile\logs\WebSphere_Portal\SystemOut.log

Now, when you double-click the shortcut, WinTail will open directly against your Portal log file and you can watch her as she rolls, as shown below.

You can also create additional shortcuts pointing to different log files.

Posted in IBM WebSphere Portal | Tagged | Leave a comment

Now Available – WebSphere Portal and WCM V7.0 fix pack 2

Portal and WCM fix pack 2 is now available.

The fix pack includes a cumulative collection of fixes and updated support for several underlying components. It updates the IBM WebSphere Portal 7.0 (7.0.0.0) or 7.0.0.1 level to the 7.0.0.2 release level. The fix pack can be used to upgrade the IBM Web Content Manager 7.0 (7.0.0.0) or 7.0.0.1 level to the 7.0.0.2 service release level. This fix pack can also be used to upgrade IBM WebSphere Portal Express or 7.0.0.1 level to the 7.0.0.2 service release level.

Learn more and download the fix pack here: http://www-01.ibm.com/support/docview.wss?uid=swg24031676

Posted in IBM WebSphere Portal | Tagged | Leave a comment

How to Set the Title of a WebSphere Portal Page from WCM Content Title

The JSR 286 Web Content Viewer portlet can set your overall portal page title based on the title of the content item it’s displaying. Because the portlet can literally change the title element in the HTML head, it can provide you with some benefits. Here are just a few that come to mind, for example:

  • It affect the title that shows in the browser title bar (e.g. something more meaningful than “IBM WebSphere Portal – Home – Mozilla Firefox”).
  • Similarly, it affects the title shown in a browser tab when multiple tabs are used.
  • It exposes the content item title to search engines such as Google, which may be crawling the portal. This can, of course, play a significant role in Search Engine Optimization (SEO) and the effectiveness of search results.

I wasn’t even aware of this feature until the requirement was thrown on me recently. So, if you’re in the same boat, here’s your paddle:

First you want to Edit the Shared Settings on an instance of the Web Content Viewer (JSR 286) that’s deployed on a portal page as shown below:

In the Web Content Viewer portlet, find the Portlet Settings section and set the option for ‘Page Display Title’ to ‘Select from content’ as shown below.

Apply these changes and give it a test by navigating to the portal page upon which that Web Content Viewer was deployed. Take a look at the title displayed in the browser window, browser tab, or in the HEAD section of the page’s HTML source. There, you should now see the title of the WCM content item that’s currently displayed by the portlet.

Sweet.

Posted in IBM Web Content Manager | 2 Comments

Debug Tracing in IBM Web Experience Factory

You can turn on debug tracing for a model in IBM Web Experience Factory with the following procedure:

  • In /WEB-INF/config/log4j.properties, set log4j.logger.bowstreet.system.debugTracing to DEBUG
  • Add a Debug Tracing builder to the model and name it ‘debugTrace’.
  • Check ‘Trace all actions’.
  • Check ‘Log Parameters’ (if you want to log HTTP request parameters, which enable you to see the values submitted by forms).
  • Position the builder high in the model amongst the list of builders.
  • Log statements will be written to the WEB-INF/logs/debugTracing.txt of the deployed application; for example: C:\IBM\WebSphere\wp_profile\installedApps\node1\MyApp.ear\MyApp.war\WEB-INF\logs\debugTracing.txt

TIP: On Windows systems, you can use a tool like WinTail to tail the debugTrace.txt file as it rolls.

When your done debugging, don’t forget to set the DEBUG level back to INFO (where we changed it in the first point above) and also disable the debugTracing builder.

Posted in IBM WebSphere Portal | Tagged | Leave a comment

How to Set Default Value of a Text Field in IBM Web Experience Factory

I recently wasted an embarrassing amount of time trying to figure out how to simply set a default value in a text field on a page created by a Data Services User Interface (DSUI) builder. So, after having finally found the solution, I thought I thought I better post it so it might be found more easily in the future. Here’s the skinny:

UPDATE: Please take care to note the first comment to this post; it adds important information.

Navigate to the Design tab of your consumer model, which contains the page and text field where you want to have a default value. Select the page in the application tree (under Pages). In the visual display of the page, you can right-click the field and select Formatting and Visibility > Attribute Setter, as shown below:

Creating a New Attribute Setter builder from the page UI.

This creates a new Attribute Setter builder in the model. Set the Page Locations to be single, select the appropriate page, and then add name as an attribute to set in the Attribute List table. Under the value column, type a string value to represent the default (this could also be a variable, the result from an Action, the result from an Action List, or the result of a Method).

Factory Attribute Setter builder

After you click Apply to apply the settings of the Attribute Setter builder, you will then see the default value in the UI of the page instead of the field’s logical name.

When you run the application the form field value will be pre-populated as per your settings.

Posted in IBM WebSphere Portal | Tagged | 2 Comments

WebSphere Portlet Factory Placeholder – No portlets defined in project

Problem

The project has a portlet adapter, but WEB-INF/portlet.xml has no model defined for the model init-param. After deploying the portlet WAR, the message “WebSphere Portlet Factory Placeholder – No portlets defined in project – projectName” is displayed for the portlet title and description.

Solution

  • In your project delete the WebContent\WEB-INF\models\ExternalModelProperties.xml file. This file will not be visible in the Project Explorer view. You can find it by using the Navigator view (Window > Show View > Other > General > Navigator).
  • Open each portlet model and regen then save it.
Posted in IBM WebSphere Portal | Tagged | Leave a comment

Web Content Authoring within a Virtual Portal

Though it is not necessary to have a unique WCM Authoring UI per virtual portal, there are some reasons why you might find it useful. Here are three that I can think of:

  • Configuring a unique WCM Authoring UI in a virtual portal can allow you to configure specific Authoring Portlet preferences. For example: which libraries are visible to the portlet and relevant to the virtual portal.
  • Previewing items from within WCM in a virtual portal context can automatically render the previews inside of the virtual portal’s theme.
  • Content authors may get confused by switching between the virtual portal and base portal. Directing all access beyond the virtual portal context path can simplify things.

Lessons Learned

Here are some lessons I’ve learned recently about setting up WCM content authoring within a virtual portal:

  • You’ll need to create a page inside of the virtual portal and deploy the Web Content Authoring Portlet to it. You can then use Preferences > Edit Shared Settings to configure properties that will be specific to the virtual portal. For example – what libraries display in the WCM Authoring Portlet or whether or not the advanced Ephox EditLive! editor is used.
  • To use WCM Authoring within a virtual portal, you must copy the hidden page (com.ibm.wps.hiddenpage.wcm.Authoring_Portlet) from the base portal into the virtual portal. If you do not do this, you will find that opening certain dialogs from within the WCM Authoring portlet fails (when you go to choose a Site Area for a content item, for example). Instead of opening the normal WCM picker dialog you’d expect to see, the dialog will just open to the very page you’re looking at. The solution is detailed in the following tech note: Unable to use Authoring portlet in a Virtual Portal.
  • Create a “wcmAuthoring” URL mapping in your virtual portal that points to your virtual portal’s WCM Authoring page just like the base portal has. In fact, if you theme will not have the navigation for it, you must! In fact, it’s also handy to create a URL mapping to “Administration” so you can easily get to the virtual-portal-specific portal admin area.
  • Even though you are in a virtual portal, it’s ideal to leave the theme for your virtual portal’s WCM Authoring page set to the Page Builder theme. Hopefully, you can live with the idea that branding is for the end-users, not the content authors; if so, it can simplify your maintenance.
Posted in IBM Web Content Manager, IBM WebSphere Portal | Leave a comment

Resolution – 404 errors accessing WCM content through the POC Servlet (/wps/mypoc/…)

Recently, we had a problem where WCM URLs in OmniFind search results (generated by the Portal seedlist mechanism) were giving 404 errors when clicked. These are URLs that contain /wps/mypoc in the URL. This page documents a solution that worked for us.

/poc and /mypoc are mapped to the POC Servlet which is part of the URI resolution framework. The purpose of the URI resolution framework is to resolve a WCM resource (that is, a piece of content or POC) to a portal view. You can learn a lot about the URI resolution framework in this excellent article: Leveraging WebSphere Portal V6 programming model: Part 5. Accessing portal content with custom URLs.

But let me get to the point quickly. As you may know, you can create a portal page with the WCM Web Content Viewer (JSR286) on it and map the portal page to a site or web content folder in WCM. After creating and saving a portal page, you can find this mapping control in the advanced section when you edit the page properties. After mapping the portal page to a web content folder in WCM, any piece of content within that area should then get resolved to the mapped portal page and consequently render in the JSR286 viewer that is on it.

But recently, we had an issue where that wasn’t going too well for us; the default URL generated by the seedlist mechanism just wasn’t working – we got 404 response. We could not get the POC Servlet to resolve properly to a portal page. We were able to resolve the issue by rewriting the URL using a RegEx filter mechanism available to OmniFind. We found that links would always resolve properly as long as the base URL was as follows (with the content identifier appended):

https://www.ourportal.com/wps/mypoc/?urile=wcm%3apath%3a%2f

That is just an encoded form of the following:

https://www.ourportal.com/wps/mypoc/?urile=wcm:path:/

Append the content identifier to the end of that (typically the wcm library, site area path, and content ID). For example:

Content%2fSiteArea1%2fSiteArea1-1%2f7cdad580493e87dd89e7891b4dda79ec

Together, the resolvable URL should looks something like this:

https://www.ourportal.com/wps/mypoc/?urile=wcm%3apath%3a%2fContent%2fSiteArea1%2fSiteArea1-1%2f7cdad580493e87dd89e7891b4dda79ec

And that worked for us. It resolved to a portal view. You could tell because the URL in the browser then switched to one of those crazy portal URLs with all the state information encoded in it… and the expected piece of content was rendered in the JSR286 Web Content Viewer.

If you’re interested in learning more about how to rewrite search result URLs in OmniFind using the RegEx filter, see the following tech-note: How to use “Configuring a regular expression URL filter for search results” feature in Enterprise search portlet deployed on WebSphere Portal version 6

Posted in IBM Web Content Manager, IBM WebSphere Portal | Tagged | Leave a comment

Troubleshooting WCM Syndication Issues

Following are some things I’ve learned about troubleshooting syndication. I’ll try to keep this page up to date when I learn more…

  • Portal versions and fix levels must be the same between servers in order for syndication to work. (note: I think this is not completely true anymore in newer versions)
  • Sometimes, it is necessary to ‘touch’ content item on the syndicator to force it to syndicate.
  • Check the status of the syndicator and subscriber in Portal Administration; click the link to review the Last Update report. If there is only a partial update or failure, clues may be found in this report. Often, however, the clues may not be enough.
  • So, then you can turn on tracing for syndication, and tail the logs.
  • Try to Update the syndicator or subscriber through Portal Admin. If that does not work…
  • Try to Rebuild on the syndicator or subscriber through Portal Admin.
  • Failing that, try the following:
    • Stop servers (synicator and subscriber) and clear the contents of the following directories: /tranlog, /temp, /wstemp
    • Execute: ./ConfigEngine.sh wcm-reset-event-log (Details are for V61 are at: http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v6101/wcm/wcm_config_reset_event_log.html)
    • Check WcmConfigServices.properties file on syndicator to ensure the following settings:
      • connect.moduleconfig.syndication.inittasks=true
      • deployment.subscriberOnly=false
    • Check WcmConfigServices.properties file on the subscriber to ensure the following settings:
      • connect.moduleconfig.syndication.inittasks=true
      • deployment.subscriberOnly=true
    • Clear the contents of the Portal server logs directory
    • Start servers
  • If all else fails, it is sometimes necessary to completely delete and reconstruct the syndicator/subscriber pair. This is a last resort option because updates remaining in the item cabinet could be lost if those updates haven’t been sent over. After reconstructing, it is possible that you’d have to ‘touch’ those items to force them to syndicate again.

Remember that you should always check the log files when there are syndication issues to see if clues can be found there. You might also enable tracing to get more detailed logging.

Posted in IBM Web Content Manager | 2 Comments

Available Now: IBM WebSphere Portal and IBM Web Content Manager Version 8.0 – Beta 2

The second beta release of IBM WebSphere Portal and IBM Web Content Manager version 8.0 (a.k.a. the IBM Customer Experience Suite) is available now and you can find it here: IBM Customer Experience Suite, IBM WebSphere Portal and IBM Web Content Manager Open Beta.

Posted in IBM Web Content Manager, IBM WebSphere Portal, News | Leave a comment