Publishing your application

Publishing involves copying files (projects, resource files, and server configurations) to the correct location for the server to find and use them. In the test environments, these files may already be in the correct location. In some cases, temporary copies of the server configurations may be created. You can either publish your application automatically or manually.
Automatically publishing to a server

If the Automatically publish when starting servers check box on the Server preferences page (Window > Preferences > Server > Launching) is selected, the server tools check to see if your project and files on the server are synchronized. If they are not, the project and the files are automatically updated when the server is either started or restarted.

In the workbench, you have several options to choose for the Automatic Publishing settings. You can set these Automatic Publishing settings by going into the Servers view, right-click the server and select Open. The Server editor opens. In the Overview page of the server editor, under the Automatic Publishing settings, you are going to find the following settings:
  • Use default publishing settings: Specifies to use the publishing settings as defined in the Preferences page (Window > Preferences > Server). Refer to the Defining the server preferences topic for details on the publishing options in this preference page.
  • Never publish automatically: Specifies the workbench should never publish files to the server.
  • Override default settings: Specifies that a change to the files running on the server should automatically be published to the server in the next seconds interval, where seconds is the number of seconds you have specified in the Publishing interval control. The default value for the publishing interval on a local server is 5 seconds and for a remote server is 60 seconds. If you set the publishing interval to 0 seconds, a change to the files running on the server should automatically request a publish command to occur.

In the workbench, the default setting is the Override default settings option is enabled with a value set to the publishing interval.

Manually publishing to a server

If you do not want to wait for the automatic publishing interval to pass, at anytime you can manually request the workbench to issue a publish command to the server. Each manual publish command causes a single publishing request to the server. To publish your application manually you can complete one of the following in the Servers view:

For the WebSphere® Application Server v5.1, Tomcat local server, J2EE publishing server and Static Web publishing server environments, clicking Publish to the server icon transfers publishable files outside the workbench. When publishing to one of these servers, you can select one of the following publishing method:
  • Local copy to copy resources directly from one machine to another in the file system. This option is supported for remote WebSphere Application Server v5.11, or Tomcat1 servers.
  • FTP file transfer to copy resources from one machine to another using File Transfer Protocol (FTP). This option is supported for remote WebSphere Application Server v5.11, J2EE Publishing Server1 or Static Web Publishing server1.
For WebSphere Application Server v6.x, the publishing method is handled automatically using a WebSphere file transfer servlet. You must run the WebSphere File Transfer servlet application, filetransfer.ear. This application is installed and started on the WebSphere Application Server v6.x by default. As a result, for a remote WebSphere Application Server v6.x, the Agent Controller is no longer required. If you are running a remote WebSphere Application Server v6.x in secured mode, the output of the server might not appear in the Console view. You need to run a redeployFileTransfer.jacl script to correct this problem, see Console output does not display for remote WebSphere Application Server v6.x topic for details.

All the projects defined in the server configuration that are associated with the selected server are published. The resources in these projects are transferred to the location that is defined by the server.

Related concepts
Working with a WebSphere Application Server Network Deployment environment
Related tasks
Creating a WebSphere Application Server v6.x
Setting publishing preferences for a WebSphere Application Server v6.x
Defining the server preferences
1 Not available in WebSphere Application Server Toolkit V6.1.x, but available in products such as Rational® Application Developer V7.0.x or Rational® Software Architect V7.0.x

Feedback