Changing the port used by your WebFacing applications

The WebFacing server acts as a gateway between WebSphere Application Server and your original iSeries application. When the WebFacing runtime server is started, if it does not see a WebFacing port definition as-WebFacing in WRKSRVTBLE, then the default port 4004 is used. If there is another port that you would prefer to use, you make these changes on the server with the WRKSRVTBLE command and in the properties files for your converted WebFacing projects.

Changing the WebFacing runtime port on your iSeries server

  1. Access the Work with Service Table Entries screen. From an iSeries server command line, enter the command: WRKSRVTBLE. The Work with Service Table Entries screen is displayed.
  2. Page down to the as-WebFacing service.
    Note: If you have not redefined the WebFacing port manually before, you will not see an entry for as-WebFacing. If you have not previously manually defined a WebFacing port, skip to the step Add a new entry for as-WebFacing.
  3. Select option 5=Display to display the port information for the WebFacing server. Unless you have changed the port, the default is 4004. Press Enter or F12 to return to the Work with Service Table Entries screen.
  4. Remove the as-WebFacing entry if you have an existing one. Using option 4=Remove, remove the as-WebFacing entry (to change the port, you first need to remove an existing entry for as-WebFacing).
  5. Add a new entry for as-WebFacing.
    1. Access the Add Service Table Entry screen. Select option 1=Add. The Add Service Table Entry screen is displayed.
    2. Populate the Service field. In the Service field, between the single quotes, enter as-WebFacing.
    3. Populate the Port field. In the Port field, enter the new port number that you would like to use.
    4. Populate the Protocol field. In the Protocol field, between the single quotes, enter tcp .
    5. Press Enter. Your new WebFacing service entry is added.

Changing the WebFacing port number defined in your WebFacing projects

The port number used by a WebFacing application to communicate with the WebFacing server can be changed for the project as a whole or for individual CL commands. Ports defined for CL commands take precedence over the port defined for your project. Each CL command that your application uses will have a separate link for it in the index.html file that is created by the WebFacing conversion. If necessary, you can define a different host and associated port for each link. One reason for defining CL commands that use different hosts or ports is if you have a WebFacing project that accesses applications on more than one server. Port changes for your project or CL commands are stored in the deployment descriptor file web.xml.
Note: If you are changing a port setting used by a project that has already been deployed, generally, you must re-deploy and then restart the application in the WebSphere Administrative Console. Alternatively, you can search for the IFS location on your iSeries server where your WebFacing Web application's web.xml file is installed and redeploy from the workbench just that one file. This alternative method still requires a restart of the application. However, it can be a convenient method of changing the ID and password if your application is large.

Changing the port for your project

  1. Open the IDE and select the WebFacing Projects tab.
  2. Access the properties page for your project. Select and right-click the icon for the WebFacing project whose port you would like to change and then select Properties. The Properties page opens.
  3. Open the Run Time > Properties > Project section of the properties page. Click the Change button next to the Host port field.
  4. Click Edit in the Host Selection dialog to change the Host port. Click OK when finished. Changes are saved to the web.xml file.

Changing the port for a CL command

  1. Open the IDE and select the WebFacing Projects tab.
  2. Access the properties page for your project. Select and right-click the icon for the WebFacing project whose port you would like to change and then select Properties. The Properties page opens.
  3. Open the Run Time > Properties > Project section of the properties page. Click the label for the CL command that you want to work with. Click the Change button next to the Host port field.
  4. Click Edit in the Host Selection dialog to change the Host port. Click OK when finished. Changes are saved to the web.xml file.