Client Samples Gallery | |
![]() |
Choosing a server |
Changing the default server |
Choosing a server and port |
Most of the Samples will use the default server that was chosen during product installation time and the default WebSphere port. To change either of these values, follow the instructions below.
To change the default server that client applications connect to, follow these steps:
On Windows:
On UNIX:
- Edit the file.
- Change the line: set DEFAULTSERVERNAME= such that it reflects the servername or IP address you wish to make the default.
For example: If you want to change the default server to MYWASSERVER.COM, the line would change to:
set DEFAULTSERVERNAME=MYWASSERVER.COM
- Edit the file.
- Change the line: export DEFAULTSERVERNAME= such that it reflects the servername or IP address you wish to make the default.
For example: If you want to change the default server to MYWASSERVER.COM, the line would change to:
export DEFAULTSERVERNAME=MYWASSERVER.COM
To change the server or port that a single application connects to, follow the steps in one of the following sections:
J2EE application clients
Use the -CCBootstrapHost= and -CCBootstrapPort= parameters to launchClient.bat (on Windows) or launchClient.sh (on UNIX). These parameters are case-sensitive and must appear between the EAR file name and any parameters that are passed to the application. For the batch and script files that are supplied with most Samples, you will need to manually edit the respective file and insert these parameters.
For example: If you want to connect to server MYWASSERVER.COM on port 3000 and the current command is:
launchClient.bat TechnologySamples.ear -CCjar=BasicCalculatorClient.jar add 2 3, the updated command would look like:
launchClient.bat TechnologySamples.ear -CCBootstrapHost=MYWASSERVER.COM -CCBootstrapPort=3000 -CCjar=BasicCalculatorClient.jar add 2 3Java thin application clients
Use the -Djava.naming.provider.url= parameter to the Java call. This parameter is case-sensitive and the url format is iiop://<SERVERNAME>:<PORT>. For the batch and script files that are supplied with most Samples, you will need to manually edit the respective file and insert or change this parameter.
For example: If you want to connect to server MYWASSERVER.COM using the default port of 2809, the parameter would look as follows:
-Djava.naming.provider.url=iiop://MYWASSERVER.COM:2809Applet clients
Applets running in Microsoft Internet Explorer
Pass the java.naming.provider.url parameter to the ActiveX WebSphere Java plug-in object using the tag:
<PARAM name="java.naming.provider.url"> VALUE=iiop://<SERVERNAME>:<PORT>. For the HTML files that are supplied with some Samples, you will need to manually edit the respective file and insert or change this parameter.For example: If you want to connect to server MYWASSERVER.COM using the default port of 2809, the parameter would look as follows:
<PARAM name="java.naming.provider.url"> VALUE=iiop://MYWASSERVER.COM:2809J2EE application clients using the launch API
Set the BootstrapHost and BootstrapPort properties when calling the com.ibm.websphere.client.applicationclient.launchClient.launch() method to set the server and port the client application connects to. Applications written in Java or through the ActiveX to EJB bridge can use this method. See the WebSphere Infocenter or API documentation for more details on the use of this API.