Documente Academic
Documente Profesional
Documente Cultură
5: A
comprehensive workshop
Thomas Hurek (thurek@us.ibm.com), Software Architect, IBM
Chet Tuttle (tuttlec@us.ibm.com), Software Engineer, IBM
Falk Posch (Falk.Posch@de.ibm.com), Software Engineer, IBM
September 2014
Copyright International Business Machines Corporation 2014. All rights reserved.
Summary: The goal of this white paper is to explain the various administration and
configuration tools offered by IBM WebSphere Portal 8.5. Learn about which tool to use for
which task and about the new capabilities of WebSphere Portal 8.5, and understand
differences from previous versions of WebSphere Portal. We take you through exercises for
each tool so you can learn hands-on how to use them.
Table of Contents
1 Introduction..............................................................................................................................2
2 What is WebSphere Portal?....................................................................................................3
2.1 Configuration information.................................................................................................4
2.2 Preparing to install WebSphere Portal.............................................................................5
3 Installing WebSphere Portal....................................................................................................5
4 Understanding the WebSphere Portal file system structure..................................................25
5 Installing the latest Combined Cumulative Fix.......................................................................32
6 Command line tools...............................................................................................................42
6.1 ConfigEngine.................................................................................................................42
6.2 ConfigWizard.................................................................................................................44
6.3 Command line tools: WAS scripting...............................................................................53
6.4 XMLAccess....................................................................................................................56
6.5 WebSphere Portal scripting...........................................................................................64
6.6 ReleaseBuilder...............................................................................................................69
6.7 Solution Installer.............................................................................................................72
7 Administration user interface: Admin portlets.........................................................................77
7.1 Accessing Portal.............................................................................................................79
7.2 Admin portlets: Manage User and Groups.....................................................................81
7.3 Admin portlets: Virtual Portal Manager...........................................................................85
7.4 Administration GUI's: Managed Pages...........................................................................89
6.5 Theme Analyzer...........................................................................................................104
7.6 Admin portlets: Web Application Bridge.......................................................................109
7.7 Personalization rules....................................................................................................123
7.8 WebDAV......................................................................................................................132
8 Conclusion...........................................................................................................................142
9 Resources...........................................................................................................................142
10 Author biographies.............................................................................................................143
1 Introduction
In this white paper, we explore the newly added and already existing administration tools for
managing IBM WebSphere Portal 8.5 on IBM WebSphere Application Server 8.5.5.
The exercise is separated into the following sections:
If you are more interested in the command line tools, then you can start with Section 5; if you are
more interested with the user interface, you could start directly with Section 6.
Formatting/hints
The following color codes are used in this paper:
Magenta: A file or directory
Blue: A command to be executed
Green: A name, title, value, file content, or program output
Red: An important value
NOTE: These colors are helpful to see the different types quickly, but they are not necessary to
understand the meaning. So if you are using black and white, that will work as well. Our server
name here is localhost. Replace these server names with your local host name on which
WebSphere Portal is installed.
Environment
During the install, WebSphere Portal does the following:
SoftLayer
Worklight Server
Dynamic
Content
Themes &
Skins
WevDAV
Feed Provider
Scripts
Impersonization
Feed Reader
WCM Rendering
Search
Port al Model
AJAX Proxy
Portlet
Preferences
Site
Administ ration
Personaliizat ion
Web Application
Bridge
Rich Text
Edit or
WCM Social Media
Publisher
Site Design
Authoring
Content
Provisioning
Content
Approvals
Syndicat ion
Web Content
Integrator
Projects
Social Software
& Services
Feeds
Tools
J2EE
Web Services
JDBC
Securit y/SSO
Remote Portlet
Producer
Forms Experience
Builder
Process Designer
Worklight Consumer
Edition
Rational Application
Developer
Web Experience
Factory
EMM - Analytics
Engines
Clients as browsers or mobile devices gain access to the portal via the HTTP(s) protocol, and the
request arrives at WAS, which routes it to the WebSphere Portal servlets, portlets, widgets, and
other server side components.
The WebSphere Portal servlets, portlets, and widgets build a Web page by aggregating
information from the Portal configuration and backends via APIs and connections. The newly built
3
Web page is then sent via the HTTP(s) protocol back to the client device, which renders the
response including execution of javascript frameworks and, depending on the client, the response
can be returned in a different form of html (responsive or adaptive design).
You may want to change the WebSphere Portal configuration to integrate into your environment;
for example, to connect to your databases or LDAP Server(s), to IBM Lotus Domino mail
servers, to IBM Lotus Sametime servers, or to do the following:
WebSphere Portal is quite flexible and, depending on your use case, more than one tool can be
used to achieve your goals.
First, obtain the WebSphere Portal V8.5 install media, which can be retrieved from, for example,
the IBM Passport Advantage Web site.
Section 3 provides a step-by-step guide through the install of WebSphere Portal. If you already
have an install, you can start directly with Section 4.
Recommended Application Server fixes that will allow Portal to work better
Node name: The administrative name of your instance this information is used in case of
clustering (combining multiple installs into a group for high availability)
Profile configuration options like name of the profile, ports, creating additional profiles.
Profile Definition: For WebSphere Portal you can choose to create a profile during installation
or perform a binary only install and create the profile later.
WebSphere Portal is using the IBM Installation Manager to install WebSphere Application
Server and WebSphere Portal. You can either use the Install shell provided by Portal or
install directly with IBM Installation Manager. The minimum version of IBM Installation
Manager required is 1.7.1.
1.
From the WebSphere Portal 8.5 media launch the ./setup.sh (Linux or Unix) or setup64.exe
(Windows) command:
Select Install Portal and select Install IBM WebSphere Portal if you have local media or
expanded electronic images.
3.
Select Install IBM Installation Manager only to install just the IBM Installation Manager tool on
its own and then install WebSphere Portal from it e.g. from the Passport Advantage site.
New with this release we provide the ability to install DB2 from the Launchpad as a shortcut.
Figure 4. Triggering the installation
If you do not have IBM Installation Manager installed the install will prompt you to install it.
4.
In the licensing panel verify the license, select I accept the terms in the license agreement and
click Next.
Figure 6. Accepting the license of IBM Installation Manager
5.
In the next window choose an installation directory for the IIM and click Next (see figure 7).
6.
In the Summary window, verify the information and click Install (see figure 8).
10
7.
After the install finishes a Status window displays. Click Restart Installation Manager
to trigger the install of Portal.
11
8.
After the IIM has restarted, the Start window displays. You can install products, modify the
installation of the products (for example, by adding new features), update the products (for
example, apply ifixes or fix packs), undo changes, manage licenses, or uninstall products.
Select Install to trigger the install of Portal.
12
The Install Packages panel allows you to select the packages you want to install. Since we do not
have an existing install of WebSphere Application Server 8.5.5.2, we select not only WebSphere
Portal Server but also WebSphere Application Server and the JDK version 7. The WebSphere
Portal Enable is an additional package to the WebSphere Portal package adding an additional
content feature that WebSphere Portal Server package does not include.
9.
After selecting all check boxes select the Show all Versions box and click on the check for
Other Versions, Fixes and Extensions button to check for the latest versions. In the
Authentication window enter your IBM ID and click OK.
13
10. The next panel allows you to select the additional fixes for both WebSphere Portal and
WebSphere Application Server. We need the two on the list select them and click Next to
trigger the Install of Portal.
14
11. In the next panel you can review the license agreement click I accept and then click Next.
15
12. In the next window, select the location where WebSphere Portal and WAS will be installed;
click Next (see figure 14).
16
13. Select additional language packages that need to be installed; click Next (see figure 15).
17
Figure 15. Select installed languages for WebSphere Portal and WAS
18
19
15. In the next panel you need to determine the initial administrative user and profile
configuration for the ConfigWizard profile as well as the WebSphere Portal profile (if it
was selected in the last screen).
For this exercise we have used wpsadmin as userid and wpsadmin as password.
Continue with Enter the Administrator user ID and password for the Portal Server.
Figure 17. Entering the Portal admin ID and password
16. You will enter the node name (it can be any unique name) and the fully qualified host
name you are performing the install on as well as the cell name of the WebSphere cell
that Portal is created in. The node name is relevant for operations inside WebSphere
Application Server when building a cluster (multiple Portals). For the latter exercises
you will need the host name. Also enter the administrative userid and password. For
this exercise we have used wpsadmin as userid and wpsadmin as password.
20
17. In the Advanced mode you can specify a custom context root (instead of /wps/portal) and
custom ports, as well as a custom directory for the profile and the profile name (see figure 19
). Continue with Next.
Figure 19. Advanced Configuration options
21
16. The final window shows a summary of what will be installed (see figure 20). If the values are
as you would like, click Install for the install to start.
Figure 20. Reviewing the Installation settings
22
17. The final panel shows a summary of what will be installed. If the values are correct then click
Install for the install to start.
Figure 21. Finishing the installation
23
24
18. Once the install finished successfully you will see the following panel (sample from Windows
).Click Finish to end the install. If you select to start the Configuration Wizard a browser with
the Configuration Wizard URL will be opened.
You can also create an additional profile with the profile management tool or a Portal
development profile.
Figure 22. Finishing the Installation
You would not use the WebSphere Portal file system for modifying internal configuration files
directly, bypassing administration / configuration tools.
25
Nearly all the alternative tools mentioned in this topic modify the file system in some way.
In the following pages we will explore the WebSphere Portal file system structure, including the
following:
AppServer directory
PortalServer directory
Profile directory
ConfigEngine directory
The following are a few of the directories in the figure below that are important when working with
WebSphere Portal:
The AppServer directory, containing the binaries of WebSphere Application Server as well
as templates, utilities, and the Java Developer Kit.
The bin directory, containing the WebSphere Application Server command line tools that
are independent of the profile.
The Derby database binaries, found in the derby directory.
The Java directory, containing the Java Developer Kit 1.6 as well as the 1.7 JDK, including
the Java Runtime Edition.
26
2.
The PortalServer directory, containing mainly the binaries for WebSphere Portal. In
WebSphere Portal 8.5 the binaries and the configuration and tools are separated;
therefore, the PortalServer directory no longer needs to be touched.
The bin subdirectory, containing XMLAccess, Release Builder, version reporting, and
other command line tools. For legacy purposes the tools are still stored in this directory as
well as in the profile directory. New tools in this directory were added for the multiple profile
support.
27
The shared directory contains the main .jar file binaries of WebSphere Portal. It's possible
to drop class files into the PortalServer/shared/app directory so they're loaded by the
classloader. We would recommend though to define a custom shared library if needed.
3.
The bin directory contains all the command line tools related to the profile, for example, for
starting and stopping the server.
The config directory holds the configuration for the WebSphere Application Server.
ConfigEngine is the command line tool to trigger configuration tasks in WebSphere Portal
(it replaces the WPSConfig tool used in previous releases). The log directory inside the
28
4.
The runtime logs of WebSphere Portal can be found inside the log directory (see figure 25).
Open a File Explorer and navigate to
/opt/WebSphere/wp_profile/logs/WebSphere_Portal.
The log directory contains a directory for every server instance. For a standalone setup the
29
directory name is WebSphere_Portal. The following files are of interest in this directory:
SystemOut.log, containing the system messages, including warnings and startup information
of the server.
SystemErr.log, containing errors and exceptions.
native_stderr.log, containing the JVM messages, including garbage collection data if verbose
garbage collection is enabled. It's possible to configure a separate file to contain the verbose
garbage collection data, which would have a custom name, for example, Verbosegc.
The next directory we want to point out is the Virtual Member Manager (VMM) config directory
(see figure below). Navigate to
/opt/IBM/WebSphere/Profiles/wp_profile/logs/WebSphere_Portal/config/cells/wpvmCell_1/wim/con
fig.
5. It contains the user repository configuration data. In some previous releases the configuration
was stored in the WebSphere Member Manager Configuration files (wmm.xml).
Figure 27. Profile directory - WIM/VMM
30
6.
The ConfigEngine directory exists two times in the installation one time inside the profile and
once outside of it. The reason for the ConfigEngine in the root installation directory is to be
able to create and manage additional profiles independent of the existing profile or for a
binary only installation in which no ConfigEngine exists. Navigate to
/opt/IBM/WebSphere/ConfigEngine.
7.
The Configuration Wizard is a user interface based tool to configure the Portal. With version
8.5 we have extended it a lot to make the configuration easier. It resides within its own profile.
Navigate to /opt/IBM/WebSphere/Profiles/cw_profile.
Similar to the wp_profile the same directories exist for this profile. Important subdirectories are the
logs directory to see the logs and the bin directory to administer the profile.
31
32
from all components: WebSphere Portal Base, Web Content Manager, Personalization, etc.
Starting with version 8 the maintenance packages can be installed in the following two ways:
In this exercise we will install the latest CCF with the IIM User Interface. At the time this document
is written, the latest CCF for WebSphere Portal 8.5 is CCF 01; however, be aware that a later CCF
might be available as you read this. We recommend to take the latest available CCF. For the
instructions for installing a CCF, refer to the wiki article, IBM WebSphere Portal 8.5.0.0 Combined
Cumulative Fix Readme stand-alone.
Although we cover only the installation of the Portal CCF in this document, we also recommend
upgrading WAS; the process is similar and is also done via the Installation Manager.
1.
The Portal Server must be stopped to install maintenance. To do this, open a command
window, switch to the directory /opt/IBM/WebSphere/wp_profile/bin , and then
execute the following command (see figure 29):
./stopServer.sh WebSphere_Portal -user wpsadmin -password wpsadmin
On Windows you would run stopServer.bat WebSphere_Portal -user wpsadmin
-password wpsadmin
2.
Start the IIM User Interface by triggering (on Windows) the executable Installation
Manager\eclipse\IBMIM.exe or, on Linux,
/opt/IBM/InstallationManager/eclipse/IBMIM
The IIM Welcome window displays (see figure 30); click the Update button.
33
3.
In the next window, you can select which packages to update (see figure 31). In our case we
want to update WebSphere Portal to CCF01. Select IBM WebSphere Portal Server
v8.5 and select Next.
34
After selecting the product, IIM connects to the IBM Maintenance and Support site and searches
for fixes that are applicable to the installed version (see figure 32). Select the latest available CCF,
in our case, CCF1, and click Next.
35
4.
36
The Update Packages window lets you select certain features of Portal to be updated (see figure
34). Do not change the selection; just click Next.
Figure 35. Update Packages window
37
5.
Verify the information in the Summary window and then click Update, to trigger the update
process (see figure 36).
38
The update process involves downloading the fix pack, applying the updates to the binary files,
and then running several configuration tasks to update the deployed .ear files and possibly also
perform database updates.
If the upgrade was successful you should see a success window as shown in figure 37; click
Finish to complete the upgrade process.
39
After running the Installation Manager it is necessary to run a set of configuration tasks to update
the profile.
6.
After running the config task check for the success message:
Figure 39. Success
40
7.
After running the config task check for the success message:
Figure 41. Success
41
At the end of the process Portal is left started, so you can continue with the next exercise.
6.1 ConfigEngine
The ConfigEngine command line tool is used to execute all WebSphere Portal Config tasks. Use
the tool for configuration changes such as security configuration, enabling/disabling components,
clustering, and virtual portals, or if automation is needed.
It cannot be used for all configuration changes, some of which are possible only in WebSphere
Application Server Admin Console / Scripting.
Alternative Tools include the ConfigWizard, WebSphere Application Server Scripting, and
WebSphere Application Server Admin Console (limited set of tasks).
Note: With WebSphere Portal 8.5 the ConfigWizard has been extended and is the tool of choice
for executing configuration tasks. We recommend to use the ConfigWizard where possible (not all
tasks have been included) but support using the ConfigEngine tasks as well.
42
As an example task, let's list all available virtual portals. The ConfigEngine takes input parameters
from the command line, property files, and the parent properties file (see figure below).
Figure 42. ConfigEngine Input values via property files
43
6.2 ConfigWizard
he ConfigWizard tool lets you execute configuration changes from an easy-to-use UI that guides
the user through the complete flow and allows executing the tasks.
Use it for:
Database transfer
44
ConfigEngine
WebSphere Application Server Scripting
WebSphere Application Server Admin Console (limited set of tasks)
As an example task, let's show the beginning steps for how to add an LDAP repository:
1.
45
3. Click on Configuration Wizard to see the Configuration Wizard Welcome screen (see figure
below).
Figure 47. Configuration Wizard Welcome Screen
46
4. Take a look at each of the different parent topics and the sub tasks. You can go back by
clicking Home.
For this exercise choose Set Up a Stand-alone Server, select the Enable Federated security
link (see figure below).
Figure 48. Configuration Wizard - Workflow selection
47
4. Keep the default operating system Linux as well as the other default settings for the profile.
Note the forward and backward buttons as well as the cookie trail at the top to go back
when needed. Click the right arrow icon to move forward (see figure below).
Figure 49. Choose operating system
48
5. Leave the settings in the next screen as is; click Right Arrow (see figure below).
Figure 50. Confirm default settings
49
6. In the next window (see figure below), enter all the detailed information for your LDAP.
Choose some sample values (e.g. see screenshot below). Afterwards click the Right Arrow.
Figure 51. Filling out sample values
50
7.
In the next window (see figure below), enter the information specifically for your LDAP.
Choose some sample values (e.g. see screenshot below). Afterwards click the Right Arrow.
51
8. In the final window (see figure below), you will see all the steps that will be executed by the
Wizard one by one. There can be automatic and manual steps. You can see the command that
will be called by each step when you click the View Step Command. On the right hand side you
can see the status of each step.
Figure 53. Review and execution screen
52
This command line tool is used when creating, modifying, or deleting WebSphere Application
Server settings like dynamic cache settings and thread pools, or when automation is required. It is
not for use when modifying WebSphere Portal runtime data like pages or portlets.
Alternative tools are ConfigWizard, ConfigEngine, and WebSphere Application Server Admin
Console.
The Figure below shows the WebSphere Application Server Scripting syntax, where we do the
following:
Change to /opt/IBM/WebSphere/Profiles/wp_profile/bin
Enter ./wsadmin.sh -h
Figure 55. WebSphere Application Server Scripting syntax
54
For our sample exercise, let's enable tracing for the WebSphere Portal Server with wsadmin:
1. Enter the following command to connect to the server (see figure below):
./wsadmin.sh -host localhost -port 10033 -user wpsadmin -password wpsadmin
Figure 56. Connect to the server
The command connects to the server on the given port, using the credentials of the
wpsadmin user, and now that we're connected to the server process, we can trigger
commands.
2. Enter the following commands to enable tracing (see figure below):
$AdminControl completeObjectName
type=TraceService,node=wpvmNode_1,process=WebSphere_Portal,*
set ts [$AdminControl completeObjectName
type=TraceService,process=WebSphere_Portal,*]
$AdminControl setAttribute $ts traceSpecification com.ibm.wps.engine.*=all
Figure 57. Enable Tracing with wsadmin
4. Access WebSphere Portal in the browser by opening a browser and entering the following
URL:
http://localhost:10039/wps/portal
55
6. Disable the tracing again by running the following (see figure below):
$AdminControl setAttribute $ts traceSpecification com.ibm.wps.engine.*=all=disabled
7. Exit the tool by running the exit command.
Figure 59. Disable tracing with wsadmin
6.4 XMLAccess
his command line tool is used to create, modify, and export WebSphere Portal artifacts.
56
Specifically,
use it to:
Create, modify, and delete WebSphere Portal resources like pages or portlets
Move singular configuration changes between environments
Export WebSphere Portal artifacts
Deploy portlets
It cannot be used to modify WebSphere Application Server configuration settings. Alternative tools
are Portal Scripting and Portal Admin Console (limited set of tasks) or the Solution Installer.
The figure below shows the syntax for XMLAccess by invoking ./xmlaccess.sh in
/opt/IBM/WebSphere/Profiles/wp_profile/PortalServer/bin.
Figure 60. XMLAccess syntax
57
XMLAccess - Export
For our sample task, we export a complete release and deploy a portlet. The input file controls
what actions are performed, and we use ExportRelease.xml for a full export in the release format
(required later by Release Builder).
Figure below shows sample files in /opt/IBM/WebSphere/PortalServer/doc/xml-samples.
Figure 61. Sample .xml files
58
The file defines the XML syntax used by XMLAccess to export the release data of WebSphere
Portal.
1.
wpsadmin
Figure 63. Triggering the export
60
61
62
XMLAccess - Import
Now let's deploy a sample portlet with the XMLAccess input script shown in listing 1:
Listing 1. XMLAccess script
63
The WCM Support tools portlet (you can find it here) WCMSupportTools80.war will be imported
from the path /tmp, and you can use the sample file, DeployPortlet.xml, in the directory /tmp:
1. Open command line, change to /opt/IBM/WebSphere/Profiles/wp_profile/PortalServer/bin,
copy the war file in the expected location, and trigger following commands (see figure
below):
./xmlaccess.sh -in /tmp/DeployPortlet.xml -out DeployPortlet_out.xml -url
http://localhost:10039/wps/config -user wpsadmin -password wpsadmin
Figure 66. Open command line and trigger
The portlet is now imported and can be used in our next exercises.
Creating or modifying a limited set of WebSphere Portal resources like pages or portlets
Combining with wsadmin WAS scripts to modify WAS settings at the same time
64
The first is Interactive mode, which allows us to trigger single commands and whose
response is directly visible.
The second is Scripting mode, which allows us to execute a complete, prepared script
consisting of several actions.
Interactive mode
As an example task, we create a sample portal page, using the Interactive mode:
1.
2.
3.
In the Login at the Target Server window (see figure 61), enter wpsadmin in both the User
Identity and User Password fields; confirm by clicking OK.
4. Log on to the portal, using the following script command (see figure 62):
Portal.login(wpsadmin,wpsadmin)
Figure 69. Log on to the portal
65
7.
Select the parent page of our new page by first finding the parent page (see figure below)
Content.find(all, uniquename, ibm.portal.Home)
and then selecting the page:
Content.select("Z6_00000000000000A0BR2B300GO2")
Figure 71. Find and select page
6. Create an empty page and immediately select this new page (see figure below):
Content.create(page,TestPage,html,public,select)
Figure 72. Create and select empty page
66
8. Quit the interactive mode, using the quit command (see figure below).
Figure 74. Quit interactive mode
67
Scripting mode
Now let's modify the created test page, this time using the Scripting mode:
1. Create a file UpdateLayout.py in the directory
/opt/IBM/WebSphere/Profiles/wp_profile/PortalServer/bin with the content in listing 2 (you
can use the UpdateLayout.py file in the /tmp directory):
Listing 2. Script for UpdateLayout.py
# login to portal
Portal.login("wpsadmin","wpsadmin")
print " 1. login done."
# select page
Content.select(Content.find("all","uniquename","wp.test.page"))
print " 2. page selected"
# search portlet
portletA = Portlet.find("portlet", "name", "WCMSupportTools")
print " 3. portlet found: " + portletA
# create a vertical container
Layout.create("container", "vertical", "select")
print " 4. vertical container created."
# create a control with the portlet
Layout.create("control", portletA)
print " 5. create control with support portlet."
# logout again
Portal.logout()
print " 6. logout."
print
print " Processing done."
where # denotes a comment, print prints a message to the command line, and the
sequence of the script is:
Login
Locate the page
Create a container on the page to hold the portlet
Put the portlet into the container
Logout
The script will update the page we created earlier with the Interactive mode, and the portlet
deployed earlier with XMLAccess will be added to the page.
68
2. Invoke the script to set the layout for the new test page (see figure below):
./wpscript.sh -user wpsadmin -password wpsadmin -lang jython -f /tmp/UpdateLayout.py
Figure 75. Invoke script
The command executes the script contained in UpdateLayout.py under the user identity
wpsadmin.
6.6 ReleaseBuilder
This command line tool compares different XMLAccess exports taken over time, generating a
difference XMLAccess file that can be used to move the changes made to the next environment.
The tool is used in staging to production scenarios.
It's not to be used to compare XMLAccess exports between different environments or for other
tasks.
Alternative tools are Portal XMLAccess (limited scenario to move single resources) and Portal
Admin Console Managed pages feature.
You use ReleaseBuilder to generate a diff file. Before you can use ReleaseBuilder, however, you
must generate the next release export using xml access:
1.
2.
Generate the release export by invoking following command (see figure 68):
./xmlaccess.sh -in /opt/WebSphere/Portal/doc/xmlsamples/ExportRelease.xml -out ChangedRelease.xml -url
http://localhost:10039/wps/config -user wpsadmin -password wpsadmin
69
Now we can use the ReleaseBuilder to generate a diff file that contains all the changed
information:
1.
70
2.
Now we generate the difference between the release export we did at the beginning of this
paper and the release export we just created. To do this, execute the following command (see
figure 71):
./releasebuilder.sh -inOld InitialRelease.xml -inNew
ChangedRelease.xml -out ReleaseDiff.xml
3.
Check the resulting ReleaseDiff.xml, as shown in figure below (for example, gedit
ReleaseDiff.xml).
71
Notice that the file contains the Web application defining the portlet as well as the page
(content-node) and the portlet on the page. Also note the new proxy-config settings the
former AJAX proxy configuration is now part of XMLAccess and so can easily be staged.
4.
Now check for the page we created (TestPage) and the portlet
(WCMSupportTools80.war) we deployed after the initial export.
The ReleaseDiff.xml file can be used to import your changes to another system that's
prepared to receive these changes.
Enterprise Applications
Portlets
Run XMLAccess
72
It is frequently used to deploy Portal Catalog solutions that are provided by the Portal and WCM
Development Teams but it is also possible to use it to create your own application packages.
While with previous releases of WebSphere Portal the Solution Installer had to be installed
separately, it is part of WebSphere Portal 8.x.
Alternative tools are Portal XML Access and Portal Admin Portlets (limited set of tasks) or Portal
Scripting.
New with version 8.5:
You can export the artifacts into an initial Portal Application Archive on the source system
including themes, war files, pages and portlets,
After the initial release you can build a differential release with the Portal Application Archive
format.
In this exercise we will deploy the IBM Script Portlet package that is provided on the catalog at the
following URL:
https://greenhouse.lotus.com/plugins/plugincatalog.nsf/assetDetails.xsp?
action=editDocument&documentId=DDB5C467D991413285257C67002476E0
The package consists of a portlet and WCM content.
Later on we will try out the task to export all artifacts for an initial staging.
73
The installation of a PAA archive consists of two steps the install that lays down the files and the
deployment that invokes the configuration steps and scripts.
Execute the following command in the directory,
/opt/IBM/WebSphere/Profiles/wp_profile/ConfigEngine, as follows (see figure below):
./ConfigEngine.sh install-paa -DPAALocation=/tmp/scriptportlet.paa
-DWasPassword=wpsadmin -DPortalAdminPwd=wpsadmin
Figure 81. Triggering the Install PAA command
Now that we have installed the PAA we need to trigger the deployment.
In the same command line trigger the following command:
./ConfigEngine.sh deploy-paa -DappName=scriptportlet-app -DWasPassword=wpsadmin
-DPortalAdminPwd=wpsadmin
Figure 83. Triggering the Deploy PAA command
74
Next we will try out the new configuration task to export the initial release for a staging to
production using the Portal Application Archive.
Execute the following command in the directory,
/opt/IBM/WebSphere/Profiles/wp_profile/ConfigEngine, as follows (see figure below):
./ConfigEngine.sh build-initial-release-paa -DdestPAADir=/tmp -DWasPassword=wpsadmin
-DPortalAdminPwd=wpsadmin
Figure 85. Triggering the export initial release PAA command
You can add the following parameters to customize the build-initial-release-paa task:
sharedAppResourcesRootDir
The directory for .jar files, classes, and compressed files that are then stored in the shared/app
directory.
sharedExtResourcesRootDir
The directory for .jar files, classes, and compressed files that are then stored in the shared/ext
directory.
appsToExtract
A comma-separated list of applications to extract from the source environment. For example,
you might extract the wps_theme,iehs,dojo_resources files. They are then packaged in the PAA
file.
exportWebDavTheme
Enter a value of true to download and include the themes.zip file from WebDAV.
exportWcmData
Enter a value of true to export all Web Content Manager libraries. The export-wcm-data task is
run when you use exportWcmData.
Restriction: Do not use this parameter in place of syndicating the libraries from the target
environment.
The export we took is from the default base Portal. When having virtual Portals additional
commands need to be run for each Virtual Portal.
75
Let us investigate next what is part of the created PAA. The PAA format is basically a renamed zip
file. Unzip the file /tmp/WebSpherePortal.paa and investigate the different directories:
2 Components WebSpherePortal.shared for data shared across all Portals,
WebSpherePortal.unique for the virtual/base Portal we just exported from.
The subdirectories of each contain the war files, WAS configuration, xmlaccess for the Portal
artifacts, PZN rules, WCM Libraries,
Figure 87. Analyzing the exported PAA file
The exported PAA file can be imported into a target system that has been emptied first.
76
Subsequently you can generate differential PAA releases by using the syntax:
./ConfigEngine.sh build-initial-release-paa -DdestPAADir=directory_to_store_PAA
-DpreviousPAA=initial_PAA -DWasPassword=password -DPortalAdminPwd=password
administer Web applications/ portlets (for example, provide portlets for or consume
portlets from other WebSphere Portal servers)
change the access control (users and groups, credential vault, policies)
modify WebSphere Portal settings (e.g. URL mappings, supported markups and
clients)
modify WebSphere Portal content (e.g. Web Content libraries, syndication, feeds)
manage search administration (for example, define and manage search collections)
77
Portlets related to Web Content Management, Personalization Rules, as well as Collaboration and
Messaging are located below the Applications tab (see figure below).
Figure 89. Application portlets navigation pane
Sametime
Integration
Personalization
Rules
BPM
Integration
Web Content
Creation
Web Content
Preview
explore the new tool bar to create and update a page, Web Content creating, explore project
management, page previewing, and impersonation
use WebDav to connect to Portal and explore the new theme profiles
78
the links on the banner for Sign Up and Login are also pages that can be used for login and
signing up to create a new user id
Note the new toolbar with the drop down for navigation across root pages
Figure 90. Anonymous start page
79
2.
Click the login link and log in with userid wpsadmin and password wpsadmin.
After the login the default page Getting Started is displayed. The page contains a portlet
displaying some welcome information. The structure of the web site is defined by the theme
which links are displayed, how the navigation looks like, the colors, branding,
See the next figure for details:
Figure 92. Authenticated Area after Portal Login
80
Additional Actions
e.g. for Analytics
Logout
New with version 8.5 we have introduced the Universal Toolbar it can be used for:
Creating a page
Deleting a page
Preview
Toggle Modification
Options
Navigation
81
Later, the non-admin user is used to demonstrate the Page Builder sharing functionality.
Alternatively, you can create users by using XMLAccess or directly in the LDAP, or in the
WebSphere Application Server Admin Console.
To create a new user with the Admin Portlet:
1. Open a browser with http://localhost:10039/wps/portal and log in with userid wpsadmin and
password wpsadmin.
2. Use the toolbar to go to Access:
Figure 95. Navigating to User and Groups
3.
Then go to Users and Groups, and click the New User button (see figure below).
82
83
4. Confirm the user creation by clicking OK; you should see the User created successfully
message (see figure below).
Figure 98. Success message
84
Note that you can also create virtual portals by using the scripting interface and then using
XMLAccess to fill the virtual portal.
85
86
3. Click OK.
87
You should see the created successfully message and our new The Accounts Virtual Portal listed
in the portlet (see figure below).
Figure 102. Confirmation of creation
4. Log in to the newly created Virtual Portal (see figure below) by specifying the URL context
(http://localhost:10039/wps/portal/accounts). Click Login.
Figure 103. Login screen
88
The figure below shows the Administration area of a virtual portal, within which you have a limited
set of administration tools.
Figure 104. Administration area
Modifying a page:
Assign Permissions
Tagging and Rating
Managing Labels
Vanity URLs
Dojo is not used any more for the main window during edit mode
90
5. Enter a name for the project. Note the new ability to use project templates that already
define certain default settings.
Hit the Create button.
Figure 106. Creating a project
After creating the project the Theme directly switches to the Edit Mode of the current page.
Note that there is a link now to jump back to the View Mode to view the changes you have made.
Also note that the display now happens as part of the project we created. The project
MyFirstProject is selected. The items that are part of the project are displayed at the moment
there is no item. The new project menu allows you to configure the project, exit it and additional
options like creating a project template out of the current project.
Figure 107. Success screen for project creation
91
92
See the newly created page being displayed and selected. At the moment there is no content on
the page.
Select the Applications link in the shortcut section.
Figure 109. Edit the empty page
93
94
Click the plus icon besides the portlet or use drag and drop to put the portlet on the page.
See figure below.
Figure 111. Adding the script portlet
95
Enter Syndicated Feed Portlet in the search dialog and drag and drop it on the page.
Figure 112. Add a feed portlet
After having added the feed portlet to the page you can see that both portlets were added. The
feed portlet is pointing to a default feed while the script portlet does not show anything yet.
Let's see how it looks like for an end user by using the preview function. Note that a normal user
would not see the current page as it is in draft mode and the project has not been published.
The Preview mode allows us to see how an end user would see the page after it has been
published.
Select Menu -> Preview As User.
Figure 113. Previewing the Page
In the Impersonation dialog select a user to impersonate by entering the name of the user we
created earlier (user1) into the search field and click the search icon.
In the resulting dialog select the radio button in front of the user and click the Impersonate button.
With that you effectively become this user and so can review what he will see after the page has
been published.
Figure 114. Impersonating the user
96
After triggering the Impersonation you can see the page as the user would see it. Note the
selected project. Also note the userid that is displayed you know show as user1 that you
impersonated.
Click the Stop Previewing button to undo the impersonation and become the admin user again.
Figure 115. Previewing the page as impersonated user
97
Now that we are the admin user again we want to continue modifying our page.
Select the Page -> Style section and select a style.
Figure 116. Selecting a style
The layout of the page determines which content is displayed where on the page.
Select the Layout tab and select a different layout.
Figure 117. Selecting a layout
98
The new vanity URL feature let's you create a short URL for a resource in Portal outside of
hierarchy.
Select the Vanity URL tab and enter a URL.
Figure 118. Entering a vanity URL
99
In the View mode you can see how the page will look like. Note that you see the page version as it
is part of the project you created. It is still a draft page.
Select the project and select the Published Site state to see how the page looked before the
modifications we made.
Figure 119. Viewing the page
In the published state we can see that the page does not even exist.
Let's go back to the project and publish it.
Select Published Site and select our project.
Figure 120. Viewing the published state
Select the Project at the top and click the Manage link.
Figure 121. Entering Project Management
100
Notice that all the items we worked on are part of the project.
Select the different items and click More Approve. Typically this task would be handled by a
different person or group e.g. your boss.
Figure 122. Project management
101
Notice that after the Approval the documents / page are now in Publish Pending state.
We will now publish the project by pressing the Publish Project button.
Figure 123. Publishing the project
102
Note that now that we have published the page the new page is showing in the Published Site
state.
Select the new page and have a look.
Figure 124. Viewing the modified page after publication
103
Let us try the vanity URL we created. Enter the following URL and notice that the URL changes to
our page: http://localhost:10039/wps/vanityurl/MyFirstPage
Typically you would create a rewrite rule at the HTTP server that would redirect the vanityurl
/MyFirstPage to the longer form as we entered and so you could have tiny URLs.
Figure 125. Using a vanity URL
104
3.
Select Examine page profile information. Then drill down to the two new pages we created
and verify the assigned profile.
105
4.
Go back to Home and then select Utilities -> Control Center. Select the Dynamic Content Spot
(Inline) Debug.
106
5.
Go back to Home to one of our pages and examine the inline debug mode it shows which
component / jsp is providing which part of the page.
107
6.
After examining the content spots use the toolbar to switch back to the Analytics portlet and
turn off the the debug mode.
108
of the process is creating an application component from the Web application bridge manager
portlet. The second part requires that you add the Web Dock portlet on a page and then configure
it to point to the appropriate application component.
To begin, let's open a sample Web page, for example:
http://lucene.apache.org/core/
We will integrate this web page with the Web Application Bridge.
Figure 131. Open sample Web page
Before you can use Web Application Bridge the context root of the Web Application Bridge .ear
file must be adjusted. This is a one-time operation and does not need to be performed every time
you are integrating another backend application into Portal.
To perform this change we use the WAS Administrative Console:
1.
Log in to the Integrated Solutions Console (see figure below) by opening a browser and
entering: https://localhost:10032/ibm/console/logon.jsp
2.
For both the User ID and Password fields, enter wpsadmin; click the Log in button.
110
3.
111
4.
In the next window you see the wp.vwat.servlet.ear file for which you searched. Click the .ear
file to access the properties of the application (see figure below).
5.
In the properties window for the .ear file, locate and select the Context Root for
Modules link (see figure below).
112
6.
Change the Context Root field to / as shown in figure below; click OK.
7.
113
8.
If needed, search again for the wp.vwat.servlet.ear application, select the check box in front of
it, and then click Stop (see figure below).
9.
After the application has been stopped, select it again and this time click Start (see figure
below).
114
10. Verify that you see the successful start message and then log out of the console by clicking
the Logout button (see figure below).
Figure 140. Start the application and log off
Now that we are done with the WAS change let's switch back to Portal:
1. Now switch back to the browser as admin (wpsadmin/wpsadmin)
115
2. Select in the Toolbar Portlet Management > Virtual Web Application Manager
3. Then select Create Content Provider Profile.
Figure 141. Web Application Bridge Admin portlet
Enter a unique title and enter the URL http://lucene.apache.org. Then press Save.
Figure 142. Create a Content Provider Profile
116
In the next screen we can define multiple configuration settings for the Content Provider, including
Single Sign-On settings. Enter a unique name for the policy and click Save.
Figure 144. Creating access policy
117
Next we will create a web dock portlet application that we can then add to pages.
Select the Web Dock Applications tab and click Create Web Dock Application.
Figure 145. Creating web dock application
118
Next we will fill out the required information for the application and click Save .
Title: Lucene
Content provider profile: Apache
Resource path: /core
Figure 146. Creating a web dock application
119
The next step is to create another Portal page and add the Web Dock portlet to it.
Switch back to Home.
Then make sure that Published Site is selected and toggle the Edit Mode button.
We will this time create the page outside of a project the change is visible immediately then and
no versions are kept.
Then click the Create button.
Figure 147. Switch to Home and trigger Edit
In the Edit mode of the page enter a title and select Next Sibling of current page. Then click the
Create page button.
Figure 148. Result screen
120
Switch to the Page -> Layout area and select the 1 Column layout.
Figure 149. Changing the layout of a page
After the page layout has been modified go to the Menu -> Edit Page Properties option.
Figure 150. Page Properties
Go to the Advanced area and select Web Dock as the profile for the page. The profile determines
which resources are loaded for the page e.g. javascript, css files.
The theme modularization was introduced with WebSphere Portal 7.0.0.2.
The intention of the theme modularization work is to decouple feature enablement from the theme
code itself. This allows themes to be developed more easily from an outside in approach with little
knowledge about the details of how underlying code for a particular feature in Portal works. The
result of this work is to provide logical points where modules can contribute data into a theme at
runtime and to optimize those contributions by combining them when possible.
Scroll all the way down and press the Save button.
121
Next we will add the portlet to the page. Switch back to Create -> Applications, search for Lucene
and drag it onto the page.
Figure 152. Adding the portlet to the page
122
Switch back to the View Mode and see the integrated backend site that is now proxied via Portal.
Check the links on the page and note that they point to the Portal Server and not the apache Site.
Figure 153. Reviewing the resulting page
In this simple sample case we create a visibility rule that controls when a page is displayed, only
on a certain day of the week.
We use the Personalization Navigator and Editor admin portlets to create the rule and then use
the Manage Pages portlet to associate the rule with the page. Instead of using the administration
portlets it is also possible to export and import rules using the pznload command line utility. In this
exercise we focus on the admin portlets.
1.
124
2.
Select New -> Rule, to bring up the window to create a new rule (see figure below).
3.
Monday Rule
This is a visibility rule to display a portlet or page only if today is
Select Visibility Rule from the drop-down box
Select Date Weekday from the drop-down box
Select Monday and then click Submit.
125
4.
In the next window you can see that your Monday Rule has been created (see figure below).
126
Now that we have created the rule we want to associate it with one of our pages and test that it
works:
1.
To associate the page with the rule, use the toolbar to select Portal User Interface Manage
Pages, and then select Content Root Home and click the Edit Page Properties button as
shown in the figure below.
Note that if you were to select a project before making this change, the association of the rule
to the page would be part of the project. In our case we make the change without a project,
and so the change is visible immediately without a separate approval / review cycle.
127
2.
In the Edit Page properties window (see figure below), scroll down, expand the Advanced
options menu, and click the little icon to map a rule. In the pop-up menu, select the Select
Rule option.
128
3.
In the Select Rule window (see figure below), select the Monday Rule we just created and
click OK.
129
4.
Verify that the correct rule has been selected and then leave the Edit Page properties section
by clicking OK (see figure below).
130
5.
Verify that the rule works by navigating to Home and checking which pages are displayed; if
you are doing this exercise on a Monday, the page should appear. On all other days the page
should not display as shown in the figure below; instead, the next page is selected and
displayed.
131
The Personalization Rules component in Portal is quite powerful. It can be used with Web Content
Manager data as well as Portal data for campaigns and many other scenarios, and the rules can
execute custom logic to have full flexibility.
7.8 WebDAV
Our goal here is to use WebDAV to review the profile configuration of the theme. WebDAV can be
used for managing pages, static content, and for Web content management as well as managing
themes and skins.
It can also be used to browse through the page hierarchy, and to change globalization information
and metadata of pages. For static pages, users can browse, read, create, update, save, copy,
move, and delete static content.
Alternative tools are XMLAccess.
We will use the built in Linux client for webdav. In case you are using Windows use a client
software for WebDav like Anyclient
Click on Places -> Connect to Server.
Figure 164. Starting webdav connection
132
Note that there are multiple entry points with WebDav for Portal:
/themelist
Administration of themes
Administration of skins
Portal pages
/content
133
For our exercise we will connect to the themelist entry point and explore the profile configuration.
Click New Site and enter the following information...
Service Type:
Server:
Port:
Folder:
User Name:
WebDAV (HTTP)
localhost
10039
/wps/mycontenthandler/dav/themelist/
wpsadmin
In the resulting screen you can see the list of themes that are deployed in WebDav.
1.
2.
134
Open one of the profiles in the profile folder to look at the profiles (You can right click on the file
and use gedit to look at the file). The structure defines the different modules that are loaded as
part of the model. The deferred profile is the default with 8.5. It defines a minimum set of
components loaded during viewing the page and loads more in case of edit mode.
With 8.5 we introduced hidden profiles that will not show up in the Admin Console that are used
for special pages in Portal.
135
It cannot be used for modifying WebSphere Portal runtime data like pages and portlets.
Alternative tools are WebSphere Application Server Scripting, ConfigWizard, or ConfigEngine.
In our sample tasks we will explore the new features of WebSphere Application Server 8 and 8.5.5
as well as classic operations done via WebSphere Application Server.
To see what is new with WebSphere Application Server 8.5 check:
http://www.redbooks.ibm.com/redpapers/pdfs/redp4870.pdf
To log in to the Integrated Solutions Console (see figure below):
1. Open a browser and enter https://localhost:10041/ibm/console/logon.jsp
2. Enter wpsadmin/wpsamin for User ID and Password fields.
Figure 168. Log-in screen
Take a look at some of the new features in WebSphere Application Server 8.x like the new
automatic directory deployment in the figure below. Select Applications->Global deployment
settings to get to the new feature. It allows to specify a directory WebSphere Application Server
regularly scans for ear files and automatically deploys them if they exist or removes them when
deleting them. That can save quite some administration effort ;)
Figure 169. Automatic directory deployment mode
137
Another new interesting feature is the Extended Repository Service. It allows you take snapshots
of the WebSphere configuration for certain intervals and then compare those to current
configuration or even roll back to them (note though that this does not roll back Portal changes in
the database).
Figure 170. Extended Repository Service
138
Let us have a look at the installed Applications we will see the Portlets and Portal system
applications. Go to Applications -> Application types -> WebSphere enterprise applications
Figure 171. Investigating installed applications
The majority of configuration of Portal is stored inside Resource Environment Providers. Select
Resources -> Resource Environment -> Resource Environment Providers.
In the name column you can see all the different categories of properties we define.
Figure 172. Property configuration
139
Select the WP NavigatorService -> Custom properties. Take a look at the defined settings e.g.
the reload for public pages was set to 3600 seconds.
Figure 173. Review WP NavigatorService Settings
140
As part of the Java Batch Feature pack integration you can now schedule batch jobs from within
the WebSphere Application Server.
Click System Administration->Job Scheduler to get to the job scheduler.
Figure 174. Job scheduler
141
Another new feature we want to point out is the new High Performance Extensible Logging. The
feature speeds up logging and tracing. It also provides more flexible access to log and trace data:
Command line access to filter and format, Administrative console GUI to filter and format local or
remote logs and trace, even when the remote server is down, Programmatic access to filter,
format, and merge local or remote logs and trace.
Select Troubleshooting->Logs and Trace->WebSphere Portal.
Figure 175. Logging and Tracing
8 Conclusion
As a WebSphere Portal administrator, you can use different tools to modify administration and/or
configuration data. The decision as to which tool to use depends on the task to be performed and
on the preferences of the administrator. For repeatable tasks, it's always recommend to use
command line tools.
9 Resources
developerWorks WebSphere Portal zone:
http://www.ibm.com/developerworks/websphere/zones/portal/
WebSphere Portal Family wiki:
http://www-10.lotus.com/ldd/portalwiki.nsf
WebSphere Portal and Lotus Web Content Manager product documentation:
http://www.ibm.com/developerworks/websphere/zones/portal/proddoc.html
WebSphere Portal and Lotus Web Content Manager 8.5 tuning guide:
http://www10.lotus.com/ldd/portalwiki.nsf/dx/IBM_WebSphere_Portal_V_8.5_Performance_Tuning_Guide
142
Recommended Updates for WebSphere Portal and IBM Web Content Manager V8.5:
http://www-01.ibm.com/support/docview.wss?uid=swg24037802
Administering IBM WebSphere Portal 8.0: A comprehensive workshop:
http://www.ibm.com/developerworks/websphere/zones/portal/proddoc/portal8adminworkshop/
10 Author biographies
Thomas Hurek is a Software Architect at IBM's Research Triangle Park Development Lab. He
has worked on the WebSphere Portal development team since 2002, focusing on various
components including security and virtual portals. In his current role he is responsible for Fix
Packs and serves as a Consultant on the Portal Lab Based Services (SEAL) Team. You can
contact Thomas at thurek@us.ibm.com.
Chet Tuttle is an Senior Software Developer for IBM WebSphere Portal / Digital Experience
development team. He has worked as a developer, support engineer, and WCM specialist on
various components of the Digital Experience software at IBM's RTP Development Lab. You can
reach Chet at tuttlec@us.ibm.com.
Falk Posch is a Senior Software Developer for IBM WebSphere Portal. Since 2002 he has
worked as a developer, team lead, and performance expert on various components of
WebSphere Portal at IBM's Germany Development Lab. In his current role he works on
performance and scalability improvements of WebSphere Portal. You can reach Falk at
Falk.Posch@de.ibm.com.
Trademarks
developerWorks, Domino, IBM, Lotus, Notes, Quickr, Rational, and WebSphere, the IBM logo, and
143
ibm.com are trademarks or registered trademarks of IBM Corporation in the United States, other
countries, or both.
Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States, other
countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or
its affiliates.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
144