After you have the software requirements installed, below are the steps that you have to perform to setup your workspace for CM WebClient from scratch. Each step will be discussed in details when you click on the link.
Install WebClient Builder Plugin
Copy com.adcaustin.webclient. WebClientPlugin-1.8.x.jar to eclipse\dropins folder.
To confirm that WebClient Plugin builder is installed correctly.
Go to Help → About Eclipse → Click on Installation Details → Sort Plug-in Id column in ascending order.
Configure Apache Tomcat in Eclipse
a. Create a Tomcat installed runtime.
Window → Preferences → Server → Installed Runtimes → Click on Add... → Select Apache Tomcat v6.0 under Apache → Click Next > → Browse to your Apache Tomcat installation directory.

Note: Ensure the selected JRE is a full JDK and is of a version that will satisfy Apache Tomcat (this scenario was written using SUN JDK 1.6.0_02). If necessary, you can click on Installed JREs ... to add JDKs to Eclipse. Click Finish.
b. Start Tomcat server.
Window → Show View → Servers → Right-click on the server window → Select New → Server → Select Apache → Tomcat v6.0 server → Click Finish → Right-click on the server → Click Start.
Create a New Java Project
Introduction
A Java project contains the generated Plex Java source code, resource files and generated web templates.
Instructions
a. File → New → Other... → Expand Java folder → Select Java Project → Click Next >
b. Enter your project name in the project name field → Select Use default JRE (currently ‘jre6’) → click Finish.
c. Create a new resource folder named PlexResource.
Right-click on your java project → Select New → Select Source Folder → Enter PlexResource as the folder name → Click Finish.
Import PlexBuild project
Introduction
PlexBuild is an Eclipse project that contains an Apache Ant script to move Plex Java source code into Eclipse for compilation. Ant allows Eclipse to create and run Ant buildfiles from the Eclipse workbench. On the classpath tab of the Ant Runtime preference page, additional classes defining tasks and types can be added to the Ant classpath.
Instructions
- File → Import... → Expand General folder → Select Existing Projects into Workspace → Click Next >
If you have the project in a file directory, use Select root directory. If you have the project in a zip file format, use Select archive file. Browse to your directory and click Finish.
Setup PlexBuild Run Configuration
Modify Ant classpath globally
Window → Preferences → Expand Ant → Select Runtime → Open the Properties tab → Click Add Property...

Create an ANT classpath for launch configuration.
Configure build.properties File in PlexBuild project
Expand PlexBuild project → Expand BuildConfig folder → Right-click on build.properties file and select open with Text Editor.
Find the line plex.import.project_name=XXX. Edit the line so that plex.import.project_name=<your java project name>
Find the line plex.gen.root=XXX. Edit the line so that plex.gen.root=<your gen
directory>
Note that forward slashes will be used instead of backward slashes.
Save the file.
Generate your Plex functions. Do not build.
How to Run PlexBuild in Eclipse
- Go to Run → External Tools → External Tools Configuration...

- Click Run.
You should see on your console that the functions are successfully built and moved to your project source folder.

- The next time you run PlexBuild, you can click on
icon shown below.

Import WebClient project
File → Import... → Expand General folder → Select Existing Projects into Workspace → Click Next >
If you have the project in a file directory, use Select root directory. If you have the project in a zip file format, use Select archive file. Browse to your directory and click Finish.

Configure Java Project
Right-click on your java project → Select Properties → Select Java Build Path → Open Libraries tab → Click Add Library...
Select WebClient Component → Click Next > → Check WebClient → Click Finish

Import obclient.properties to your java project souce folder \src folder.
File → Import → Expand General folder → Select File System → Click Next > → Browse to ObJava directory under CA Plex folder and select obclient.properties → Click Finish.
If you have tab functions, you also need to add pvAll.jar in your java project build path.
Right-click on your java project → Select Properties → Select Java Build Path → Open Libraries tab → Click Add External JARs... → Browse to CA Plex browse to C:\Documents and Settings\All Users\Documents\CA\Plex\ver\classver\PatternLibs\ACTIVE\Beans for Plex ver
Click Finish.
Configure obclient.properties
Note: CM WebClient date and time format works based on browser locale instead of obclient.properties date and time format.
- Open obclient.properties with Text Editor.
Right-click on obclient.properties → Select Open With → Select Text Editor.
The file is configured differently depending on what driver and data source you are using. It determines which database and port to connect to. The example below is using SUN JDBC driver.
Environment.Default.Driver=sun.jdbc.odbc.JdbcOdbcDriver Environment.Default.DataSource=jdbc:odbc:WebClient
Environment.Default.User=username Environment.Default.Password=password
- Save changes.
Generate WebClient Templates
- Right-click on your java project → Select WebClient → Enable Template Builder.
WebGenTemplates folder will be automatically created under your java project. You will be prompted to enter your genlicense.lic. Click on Use Trial or enter your license file and click Finish.

The console should display “Generating Web templates” with no error message.

- You should have WebGenTemplates folder created under your java project.

Note: If there is no web template generated, check if there is a PlexResource folder created. If there is, make sure PlexResource is a source folder and there are .panelresource and .resource files associated to the function name.
Create a New Dynamic Web Project
Introduction
A Dynamic Web Project contains JSP (Java Server Pages) files, HTML files, servlets, and Plex runtime JAR files. The web project is then deployed on Apache Tomcat to be viewed on a browser. To avoid any unexpected issue, we recommend that a new server is created in the workspace before creating a new web project.
Instructions
File → New → Other... → Expand Web folder → Select Dynamic Web Project → click Next >
Enter your web project name in the project name field → Select target runtime server → Dynamic web module version should be set to 2.4 → Click Finish.


Expand your web project/WebContent/WEB-INF folder to make sure that there is web.xml file created.
Configure Build Path for the New Web Project
a. Right-click on your web project → Select Properties → Select Java Build Path
→ Open Libraries tab → Click Add Library…
b. Select WebClient Component → Click Next > → Check WebClient → Click Finish.
c. Select Deployment Assembly on Properties window → Click Add… → Select
Project → Click Next > → Select your java project → Click Finish. If you have
any additional jar files that are required for deployment, you need to add
them in Deployment Assembly.
Create a New Servlet in Web Project
Introduction
WebClientServlet is a method of deploying the CM WebClient architecture. It consists of a servlet, called WebClientServlet, which launches your WebClient Plex application within a servlet container, and a configuration file, called WebClient.properties, which contains settings for the servlet.
In this mode, a single Plex function is the top-level component of your web application, known as the entry point. Consequentially, WebClientServlet is not suitable when you wish to launch a Plex function as a Business Process in Websydian Express. If you are using Websydian Express, see chapters Deploying CM WebClient with Websydian Express for Java.
Instructions
- Right-click on your web project → Select New → Servlet → Check “Use an existing Servlet class or JSP” → Select WebClientServlet → Click OK.

- Note: If WebClientServlet is not showing up on your servlet list, add WebClient project in the Deployment Assembly under your web project.
Right-click on your web project → select Properties → select Deployment Assembly → Click Add... button → select Project → select WebClient project → click Finish. For WebClient multi session servlet implementation, select WebClientMultiSessionServlet.

- Click Finish in Create Servlet window.
Create a New Listener in WebClient Servlet
Instructions
- Right-click on your web project → Select New → Listener → Check “Use existing listener class” → Select WebSessionListener → Click OK.

- Click Finish in Create Listener window.
Add Plex Images to the Web Project
Create an images folder under WebProject/WebContent folder.
Copy/Import all images files in the images folder.
Note: Keep in mind that CM WebClient is case-sensitive. Make sure that your Plex panel properties and your image filename is a match.
Run WebClient in Eclipse
Right-click on your tomcat server in the server tab → Select Publish.
After it is finished publishing → select Start.
Open your browser and go to http://localhost:8080/<contextroot>/<servletname>
To find your context root, right-click on your web project → select Properties → Select Web Project Settings.
To find your servlet name, expand your web project → expand WebContent folder → expand WEB-INF folder → open your web.xml with Text Editor
Click on WebClient.properties and save the file in your java or web project source file.
Configure WebClient.properties
- In the file WebClient.properties, located in the src folder of either your Java Project or your Dynamic Web Project, change the properties parameters as follows.
licensingserver.ipaddr
The ipaddress of the machine where the licensing server is started. Only uncomment this property if you have WebClient licensing server installed.
For example:
licensingserver.ipaddr=localhost
licensingserver.tcpport
The TCP port on which licensing server listens. Only uncomment this property if you have WebClient licensing server installed. The default port is 65000.
For example:
licensingserver.tcpport=65000
licensingserver.licensefile
If there is no valid license file, this property must be commented. CM WebClient will automatically activate 10-user developer license. If there is a license file, then specifies the complete file system path to the license file(license.lic)
For example:
licensingserver.licensefile=C\:/Program Files\WebClient/license.lic
log4j.logger.com.adcaustin.WebClient
The granularity of the log messages. Legal values are: DEBUG, INFO,
WARN, ERROR, FATAL. DEBUG should only be used when
debugging and in test environments. In a production environment use
WARN or ERROR.
For example:
log4j.logger.com.adcaustin.WebClient=INFO, WebClientServlet
log4j.appender. WebClientServlet.file
specifies the path and the name of the log file.
For example:
log4j.appender.WebClientServlet.file=C:/WebClient.log
webclient.entry : <packagename>.<Plex function implementation name>.
The entry point to the Web Application; i.e., the initial function to be called when a new session is created. Specify the full name of the class including package names.
For example:
webclient.entry=WXPCOURSE60.WXuF
webclient.entry.timeout
The entry point that is called if a session has timed out on the server and the user attempts to resume the session.
For example:
webclient.entry.timeout=WXPCOURSE60.sesstimeout
webclient.entry.url.<path>
The entry point that is associated with a specific url. The url is determined by taking the components after the word "url", and changing dots to forward slashes (/). For example:
webclient.entry.url.pub.item=com.foo.bar causes the relative url /pub/item to launch the function com.foo.bar.
Wildcards are allowed and are specified with an asterisk(*). For example:
webclient.entry.url.api.*=com.foo.api.* causes the relative url /api/myfunc to launch the function com.foo.api.myfunc.
In both cases, the url specified is relative to the url-pattern in the servlet-mapping of the servlet in the web.xml file. The url-pattern must end with "/*" in order for this to work. For example, if the url-pattern is /webclient/*, then the url mappings above will be relative to /webclient
(e.g., /webclient/pub/item and /webclient/api/myfunc)
servlet.errorpage.url
specifies a relative URL to an error page within the context of the WAR file where the servlet is deployed. On errors the servlet will then call this error page which then is responsible of generating a response to the user. The error page have to be placed within the scope of the
WAR-file where / (slash) indicates the root of the WAR-file.
For example:
servlet.errorpage.url=/myWebProject/error.jsp
resurl.plex.imageresources
URL reference for where the image resources as referenced by Plex are kept. This URL should contain a folder named images.
For example:
resurl.plex.imageresources=/myWebProject
Define.WSACTION
/<DynamicWebProject>/<ServletName>. URL reference for servlet.
For example:
Define.WSACTION=/myWebProject/WebClientServlet
Define.WCTHEME
Set WebClient theme to either claro or tundra. This property is optional. If it is not set, the default value is set to tundra.
For example:
Define.WCTHEME=claro
servlet.statistics.level
Set this option to cause the servlet to gather some runtime statistics on called functions. This feature only works when calling AS/400 functions. The valid levels are as follows: 1 = Collect data on called functions grouped by function type and function name. The number of times each function is called as well as its inclusive run time. After each request, a report is logged to the servlet log at the INFO log level.
For example:
servlet.statistics.level=1
- Save changes.
- Republish and restart your web server. Reload the page. You may need to close the browser and relaunch the app
Related Articles
Incident Reporter Setup
Download Workshop Materials Workspace Setup The workspace is already configured, but you will need Eclipse with the Android SDK installed. To do this, please follow the instructions listed here: developer.android.com/sdk Database setup We are using ...
Incident Reporter Setup
Download Workshop Materials Workspace Setup The workspace is already configured, but you will need Eclipse with the Android SDK installed. To do this, please follow the instructions listed here: developer.android.com/sdk Database setup We are using ...
Dashboard Overview
This document will cover the basics of the CM evolveIT Dashboard. There will be a review of the different parts of the dashboard, how to customize the dashboard for personal viewing. After completing this document, you should have a basic ...
CM evolveIT ETL - Workspace Creation Wizard
1. Open Workspace Creation wizard 2. Workspace Name and Product Mode By clicking on "Create a new Workspace" button, it should be shown a dialog. Enter name (1) and select a Product Mode(2), then move to the next step (3) 3. List Project Models Each ...
CM WebClient File Upload Setup
File Upload This guide will show you how to upload files to your Web Server from your WebClient application. 1. Import the attached zip Java Project into your Eclipse Workspace. 2. Right click your Java Project, and select Properties. Under “Java ...