You don't remember the port that needs to be specified to connect to the J2EE Engine with the Visual Administrator. We'll assume that the connection is to be made direct with the dispatcher, and not with the message server.
Browse to the URI http://yourportal:yourport/sap/monitoring/SystemInfo.
In a standard installation, yourport (the HTTP port) is 50000. In general, the HTTP port is given by the formula: 50000+100*instance_number, where instance_number is a two digit number from 00 to 99 specifying the number of central instance and dialog instances.
You can see the instance number from the directory where the J2EE Engine is installed. Under /usr/sap/<SID>, there is a directory which name is formed by both the instance name and the instance number. For example, under Linux:
Here B7T is the SID, DVEBMGS is the instance name and 00 is the instance number. In this case the HTTP port is 50000+100*0 = 50000. For more info have a look at J2EE Engine Ports, Port numbers, SSL and message servers and Calculating J2EE Port Numbers.
The port number you'll need in the Visual Administrator is the P4 port of the dispatcher. You can see this from the SystemInfo view mentioned above:
Here we go! In the Visual Administrator, create a new connection, choosing a direct connection with the dispatcher.
In the next screen, specify the user that will access the system, the host name or IP address of the host which runs the system, and the P4 port number you've got from the SystemInfo view: