!--a11y-->
Operating the SAP Web Dispatcher 
The following information describes how you start and stop the SAP Web dispatcher, and the prerequisites that your system must meet to enable you to use the SAP Web dispatcher.
SAP Web
Dispatcher describes how you use the SAP Web dispatcher.
The prerequisites for operating the SAP Web dispatcher are:
· There is a profile file for the SAP Web dispatcher (see Example: Profile File of a SAP Web Dispatcher and Profile Parameters of the SAP Web Dispatcher)
· The HTTP port for the SAP message server is configured in the profile parameter of the SAP Web dispatcher (profile parameter ms/http_port).

In the ABAP-only and the integrated version (ABAP with Java add-in) of the SAP Web AS this is the ABAP message server. In the Java-only installation this is the Java message server of the central services.
· The SAP Web dispatcher must be able to contact the HTTP port of the SAP message server.
· The following services are activated in the HTTP service tree (Transaction SICF):
/sap/public/icman
/sap/public/icf_info/*
(See also
Creating an ICF
Service and
Activating and
Deactivating an ICF Service)

The prerequisites for the SAP kernel and ICF service
refer to the SAP System which is running behind the firewall Only the SAP
Web dispatcher (executable sapwebdisp) and the associated
profile file have to be installed on the computer in the DMZ (compare with
section
Architecture and
Functions of the SAP Web Dispatcher).
If you do not have the executable sapwebdisp on your kernel CD or you want to use the latest version, fetch the current SAP Web dispatcher from the SAP Service Marketplace under http://service.sap.com/patches under SAP NETWEAVER ® SAP NETWEAVER 04 ® Binary Patches ® SAP KERNEL (32/64Bit, unicode/non-unicode) ® <OS Platform> ® Database Independent. Here you can download the kernel packet DW.SAR, this contains the SAP Web dispatcher (sapwebdisp).
To use
the Web administration interface for
Monitoring the SAP Web
Dispatcher, you need the archive file ICMADMIN.SAR, which you can also
find on your kernel CD. Any patches can be found on the Service Marketplace in
kernel packet DW.SAR (see above).

With J2EE-only installations you receive the SAP Web
Dispatcher in a package with the Central Services (see below
Load Balancing Between
Many J2EE Instances).
Although the SAP Web dispatcher can run in any directory, SAP recommends that you install it in a separate directory:
Windows: C:\Program Files\SAP\SAPWebDisp
UNIX: /usr/sap/<SID>/sapwebdisp
Create the directory for this and unpack program sapwebdisp into this directory. Also copy the associated profile file into this directory.
You start the SAP Web dispatcher with the command:
sapwebdisp pf=<profile name> [-f <trace file> -t <trace level> -cleanup -shm_attach_mode <mode> -auto_restart -version]
The optional parameters have the following meaning:
· You can use -f to determine the name of the trace file. The standard is dev_webdisp.
· You can use option -t to set the Trace Level.
· -cleanup means that common resources (shared memory and so on) are released. This is necessary if the SAP Web dispatcher ran was not stopped in an orderly manner the last time it ran, but was terminated by a crash.
· -shm_attach_mode <mode>determines what should happen to the shared memory of the SAP Web dispatcher. Here, <mode>is a number that is a combination of the following values (bit mask):
1: Delete the shared memory of the SAP Web dispatcher (cleanup)
2: Try to connect to the shared memory (attach)
4: Create a new shared memory (create)
This results in the following possible options:
1: The shared memory is cleaned up and the SAP Web dispatcher ends. The behavior is the same as with the option of –cleanup.
2: The SAP Web dispatcher connects to the existing shared memory (attach). If this does not exist, the SAP Web dispatcher ends with an error.
3: Not useful
4: The SAP Web dispatcher creates a new shared memory. If this exists already, the SAP Web dispatcher ends with an error. This is also the default value, that is, the SAP Web dispatcher behaves in this way if the options -shm_attach_mode <mode> and -cleanup are not used.
5: If a shared memory exists already, it is deleted. A new shared memory is then created.
6: The system tries to attach it to an existing shared memory. If a shared memory does not exist, a new one is created.
7: As 5

These settings are useful for managing SSL client IP
addresses. With the appropriate settings, this information does not get lost
in the SHM, but can be reused if the SAP Web dispatcher crashes. See also
SAP Web
Dispatcher and SSL.
·
-auto_restart: With this option you can enable
high availability for the SAP Web dispatcher at process level. The process is
described in the section
High Availability of
the SAP Web Dispatcher.
· -version displays the version of the SAP Web dispatcher. The program is not started.

You usually start the SAP Web dispatcher as follows:
sapwebdisp pf=<Profile name>
You can also start the SAP Web Dispatcher without a profile.
If you enter
sapwebdisp -bootstrap,
the bootstrap performs the following steps:
...
1. Generates the profile sapwebdisp.pfl (if it does not already exist)
2. Creates a user for the Web administration in file icmauth.txt (if it does not already exist)
3. Starts the SAP Web Dispatcher with the generated profile
The user enters the details of the message server and the HTTP port of the SAP Web Dispatcher.
Following the bootstrap you have to unpack the
archive with the files for the Web administration, to be able to administrate
the SAP Web dispatcher in the Web interface (see
Monitoring the SAP Web
Dispatcher). To do so, call SAPCAR as follows: SAPCAR –xvf icmadmin.SAR
You can find the archive file ICMADMIN.SAR like the SAP Web Dispatcher in the kernel package DW.SAR.
The password for admin users is a four character random number that is issued to the console.
In Windows you can start the SAP Web dispatcher as a service. It will then always be started automatically whenever the computer is restarted.
Call the following:
ntscmgr install sapwebdisp -b <path>\sapwebdisp.exe -p "service pf=<profile file> <options>"
<path> stands for the path in the file system where the program is stored, <options> for more parameters as described above. If the path contains blank characters, you have to enclose the path in quotation marks (for example: -b "C:\Program Files\sapwebdisp.exe" ...).
You then see the SAP Web dispatcher sapwebdisp in the list of services.

· ntscmgr is an SAP program that must be installed on the server. For more information see SAP note 618053.
· If you have any problems due to missing Microsoft DLLs, refer to SAP note 684106.
If you want to stop the SAP Web dispatcher, you determine the process ID (PID) and enter the following command: kill -2 <pid> (UNIX) or sapntkill -INT <pid>(Windows). If the SAP Web dispatcher is running as a service in Windows, stop it by choosing Computer Management MMC ® Services ® Stop sapwebdisp.

You can take the PID of the SAP Web dispatcher from the trace file dev_webdisp in the work directory.
You start or stop the SAP Web dispatcher.
