Install WCM on a test server
Do these steps before creating a test server in RAD6.
- Extract the WCM 5.1 GA build (WCM build 179) to the Portal directory.
edit wpconfig.properties to put in the Portal admin password and also point WCM to a valid cloudscape driver and database.
- Run...
[portal51UTE]\PortalServer\config\wpsconfig.bat configure-wcm- Stop the test server from the command line
- Create new Portlet Project - Target Server WebSphere Portal v5.1 stub.
This stub needs to be pointing to the proper Test Server - setup in...
Preferences | server |Installed RuntimesFor this test, you can just create a basic portlet with all the defaults. Press Finish.
- Add the WCM jars to the Portal 5.1 JRE (This step seems to get reset if you do this before Step 5... I'm not sure why)
- Go to...
Window->Preferences-> Java -> Installed JREs- Select WebSphere Portal v5.1 JRE and press Edit
- Uncheck 'use default system libraries' and press Add External JARs...
- Select all the jars in...
[portal51UTE]\PortalServer\wcm\shared\app\...and keep pressing OK to exit the preferences.
- Open the JSP test page in code view
- select the file [project name]\webcontent\[project name]\jsp\html\[project name]PortletView.jsp
- Open With -> JSP Source Page Editor (you might need to close the existing Page Designer page first for the source to come up - this looks like a bug?).
- Enter code to access the API. Here is an example. Change the project name as appropriate.
<%@ page session="false" contentType="text/html" import="java.util.*, testwcm2.*, com.ibm.workplace.wcm.api.*, com.presence.connect.*"%> <%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %> <portletAPI:init/> <% TestWCM2PortletSessionBean sessionBean = (TestWCM2PortletSessionBean)portletRequest.getPortletSession().getAttribute(TestWCM2Portlet.SESSION_BEAN); %> <DIV style="margin: 6px"> <H3 style="margin-bottom: 3px">Welcome!</H3> This is a sample <B>WCM API</B> page. <% // First make sure that connect is initialised properly, // it needs the config file location set as a system property. // This will not be needed if the WCM.EAR is launched/included with // the test server. // Since this is a Singleton, it can be run multiple times after // Connect has started up, with any significant performance impact. System.setProperty("AptrixConnect.ConfigFileLocation", "C:/Portal51UTE/PortalServer/wcm/config/connect.cfg"); Connect.getInstance(); Repository repository = WCM_API.getRepository(); Workspace workspace = null; try { // if you do getAnonymousWorkspace() there is a bug saying workspace = repository.getWorkspace("wpsadmin","wpsadmin"); } // catching everything for debugging purposes catch (Throwable e) { e.printStackTrace(); } // this is an example API method to retrieve all user/group names String[] names = workspace.getMemberNames(); %> This test will show the first name that is retrieved (without error checking for array bounds) <br> The first name is: '<%=names[0]%>' <br> </DIV>...and then you can run the server.
I have not been able to successfully debug, that may need the new support in 5.1.01
Parent topic: Installation
IBM Workplace Web Content Management - V5.1.0.1 -
Workplace Web Content Management is a trademark of the IBM Corporation in the United States, other countries, or both.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.